/// <summary>
 /// Initializes with the UserRepository and PasswordEncryption service
 /// </summary>
 public LoginApplicationService(IUserRepository userRepository, IPasswordEncryptionService passwordEncryptionService,
                                ISecurityKeysApplicationService securityKeysApplicationService, IIdentityAccessPersistenceRepository persistenceRepository,
                                IMfaAuthorizationService mfaAuthorizationService)
 {
     _userRepository                 = userRepository;
     _passwordEncryptionService      = passwordEncryptionService;
     _securityKeysApplicationService = securityKeysApplicationService;
     _persistenceRepository          = persistenceRepository;
     _mfaAuthorizationService        = mfaAuthorizationService;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:System.Web.Http.Filters.ActionFilterAttribute"/> class.
 /// </summary>
 public MfaAuthorizationAttribute(string currentAction)
 {
     _mfaAuthorizationService = (IMfaAuthorizationService)ContextRegistry.GetContext().GetObject("MfaAuthorizationService");
     _currentAction           = currentAction;
 }
        public void ServiceInitilizationTest_ChecksIfTheServiceInstanceIsInitializedThroughSpringAsExpected_VerifiesThroughVariableValue()
        {
            IMfaAuthorizationService mfaAuthorizationService = (IMfaAuthorizationService)ContextRegistry.GetContext()["MfaAuthorizationService"];

            Assert.IsNotNull(mfaAuthorizationService);
        }