コード例 #1
0
 public ConfirmConsentFixture(ITestOutputHelper outputHelper)
 {
     _consentRepositoryFake = new Mock <IConsentRepository>();
     _clientRepositoryFake  = new Mock <IClientStore>();
     _scopeRepositoryFake   = new Mock <IScopeRepository>();
     _confirmConsentAction  = new ConfirmConsentAction(
         new Mock <IAuthorizationCodeStore>().Object,
         new Mock <ITokenStore>().Object,
         _consentRepositoryFake.Object,
         _clientRepositoryFake.Object,
         _scopeRepositoryFake.Object,
         new InMemoryJwksRepository(),
         new NoOpPublisher(),
         new TestOutputLogger("test", outputHelper));
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ConsentController"/> class.
 /// </summary>
 /// <param name="scopeRepository">The scope repository.</param>
 /// <param name="clientStore">The client store.</param>
 /// <param name="consentRepository">The consent repository.</param>
 /// <param name="dataProtectionProvider">The data protection provider.</param>
 /// <param name="eventPublisher">The event publisher.</param>
 /// <param name="tokenStore">The token store.</param>
 /// <param name="jwksStore">The JWKS store.</param>
 /// <param name="authorizationCodeStore">The authorization code store.</param>
 /// <param name="authenticationService">The authentication service.</param>
 /// <param name="logger">The controller logger.</param>
 public ConsentController(
     IScopeRepository scopeRepository,
     IClientStore clientStore,
     IConsentRepository consentRepository,
     IDataProtectionProvider dataProtectionProvider,
     IEventPublisher eventPublisher,
     ITokenStore tokenStore,
     IJwksStore jwksStore,
     IAuthorizationCodeStore authorizationCodeStore,
     IAuthenticationService authenticationService,
     ILogger <ConsentController> logger)
     : base(authenticationService)
 {
     _dataProtector  = dataProtectionProvider.CreateProtector("Request");
     _clientStore    = clientStore;
     _eventPublisher = eventPublisher;
     _logger         = logger;
     _displayConsent = new DisplayConsentAction(
         scopeRepository,
         clientStore,
         consentRepository,
         authorizationCodeStore,
         tokenStore,
         jwksStore,
         eventPublisher,
         logger);
     _confirmConsent = new ConfirmConsentAction(
         authorizationCodeStore,
         tokenStore,
         consentRepository,
         clientStore,
         scopeRepository,
         jwksStore,
         eventPublisher,
         logger);
 }