protected void SetupSubject()
        {
            MockUpdatableAuth = new Mock<IUpdatable<UserAuthentication>>();

            _passwords = new Passwords();
            _translateUserUserAuth = new DataUserToAccountUserTranslator();

            _userAuthProvider = new UserAuthenticationProvider(
                _translateUserUserAuth
                , MockRetrievableUserByEmail.Object
                , MockRetrievableAuthyId.Object
                , MockUpdatableAuth.Object
                , MockCreatableAuth.Object
                , _passwords
                , MockDeletableAuth.Object);

            Subject = new UserAccountProvider(
                _userAuthProvider
                , MockCreateableUser.Object
                , MockRetrievableUserById.Object
                , MockRetrievableUserByEmail.Object
                , MockDeletableUser.Object
                , MockUpdateableUser.Object
                , _translateUserUserAuth
                , MockSystemTime.Object);
        }
 public UserAccountProvider(
     IUserAuthenticationProvider userAuthProvider, 
     ICreatable<User> userCreator, 
     IRetrievable<ByUserId, User> userGetByUserId, 
     IRetrievable<ByUserEmail, User> retrieveUserByEmail, 
     IDeletable<User> userDeleter, 
     IUpdatable<User> userUpdater, 
     ITranslate<User, UserAccount> translateDataUserToUserAccount, 
     ISystemTime systemTime)
 {
     _userAuthProvider = userAuthProvider;
     _userCreator = userCreator;
     _userGetByUserId = userGetByUserId;
     _retrieveUserByEmail = retrieveUserByEmail;
     _userDeleter = userDeleter;
     _userUpdater = userUpdater;
     _translateDataUserToUserAccount = translateDataUserToUserAccount;
     _systemTime = systemTime;
 }
        public void InitializeProvider()
        {
            _passwords = new Passwords();
            _translateUserUserAuth = new DataUserToAccountUserTranslator();

            _userAuthProvider = new UserAuthenticationProvider(
                _translateUserUserAuth
                , _mockRetrievableUserByEmail.Object
                , _mockRetrievableAuthyId.Object
                , _mockUpdatableAuth.Object
                , _mockCreatableAuth.Object
                , _passwords
                , _mockDeletableAuth.Object);

            _subject = new UserAccountProvider(
                _userAuthProvider
                , _mockCreateableUser.Object
                , _mockRetrievableUserById.Object
                , _mockRetrievableUserByEmail.Object
                , _mockDeletableUser.Object
                , _mockUpdateableUser.Object
                , _translateUserUserAuth
                , _mockSystemTime.Object);
        }
Пример #4
0
 public iPassPacketHandler(FlexinetsEntitiesFactory contextFactory, iPassAuthenticationProxy authProxy, IUserAuthenticationProvider userAuthProvider)
 {
     _contextFactory   = contextFactory;
     _authProxy        = authProxy;
     _userAuthProvider = userAuthProvider;
 }
Пример #5
0
 public AuthenticationProvider(ICommandAuthenticationProvider commandAuthenticationProvider, IUserAuthenticationProvider userAuthenticationProvider)
 {
     _commandAuthenticationProvider = commandAuthenticationProvider;
     _userAuthenticationProvider = userAuthenticationProvider;
 }
 public XMLCommandAuthenticationProvider(IUserAuthenticationProvider userAuthenticationProvider)
 {
     _userAuthenticationProvider = userAuthenticationProvider;
 }