public UpdateUserTwoFactorAuthenticatorOperationFixture(ITestOutputHelper outputHelper)
 {
     _resourceOwnerRepositoryStub = new Mock<IResourceOwnerRepository>();
     _updateUserTwoFactorAuthenticatorOperation = new UpdateUserTwoFactorAuthenticatorOperation(
         _resourceOwnerRepositoryStub.Object,
         new TestOutputLogger("test", outputHelper));
 }
コード例 #2
0
ファイル: UserController.cs プロジェクト: jjrdk/SimpleAuth
 /// <summary>
 /// Initializes a new instance of the <see cref="UserController"/> class.
 /// </summary>
 /// <param name="resourceOwnerRepository">The resource owner repository.</param>
 /// <param name="authenticationService">The authentication service.</param>
 /// <param name="authenticationSchemeProvider">The authentication scheme provider.</param>
 /// <param name="urlHelperFactory">The URL helper factory.</param>
 /// <param name="actionContextAccessor">The action context accessor.</param>
 /// <param name="consentRepository">The consent repository.</param>
 /// <param name="scopeRepository"></param>
 /// <param name="twoFactorAuthenticationHandler">The two factor authentication handler.</param>
 /// <param name="logger">The logger</param>
 public UserController(
     IResourceOwnerRepository resourceOwnerRepository,
     IAuthenticationService authenticationService,
     IAuthenticationSchemeProvider authenticationSchemeProvider,
     IUrlHelperFactory urlHelperFactory,
     IActionContextAccessor actionContextAccessor,
     IConsentRepository consentRepository,
     IScopeRepository scopeRepository,
     ITwoFactorAuthenticationHandler twoFactorAuthenticationHandler,
     ILogger <UserController> logger)
     : base(authenticationService)
 {
     _resourceOwnerRepository = resourceOwnerRepository;
     _getUserOperation        = new GetUserOperation(resourceOwnerRepository, logger);
     _updateUserTwoFactorAuthenticatorOperation =
         new UpdateUserTwoFactorAuthenticatorOperation(resourceOwnerRepository, logger);
     _authenticationSchemeProvider = authenticationSchemeProvider;
     _consentRepository            = consentRepository;
     _scopeRepository = scopeRepository;
     _urlHelper       = urlHelperFactory.GetUrlHelper(actionContextAccessor.ActionContext !);
     _twoFactorAuthenticationHandler = twoFactorAuthenticationHandler;
     _logger = logger;
 }