public GenerateAuthorizationResponseFixture(ITestOutputHelper outputHelper) { IdentityModelEventSource.ShowPII = true; _authorizationCodeRepositoryFake = new Mock <IAuthorizationCodeStore>(); _tokenStore = new Mock <ITokenStore>(); _eventPublisher = new Mock <IEventPublisher>(); _eventPublisher.Setup(x => x.Publish(It.IsAny <TokenGranted>())).Returns(Task.CompletedTask); _clientStore = new Mock <IClientStore>(); _clientStore.Setup(x => x.GetAll(It.IsAny <CancellationToken>())).ReturnsAsync(Array.Empty <Client>()); _consentRepository = new Mock <IConsentRepository>(); var scopeRepository = new Mock <IScopeRepository>(); scopeRepository.Setup(x => x.SearchByNames(It.IsAny <CancellationToken>(), It.IsAny <string[]>())) .ReturnsAsync(new[] { new Scope { Name = "openid" } }); _inMemoryJwksRepository = new InMemoryJwksRepository(); _generateAuthorizationResponse = new GenerateAuthorizationResponse( _authorizationCodeRepositoryFake.Object, _tokenStore.Object, scopeRepository.Object, _clientStore.Object, _consentRepository.Object, _inMemoryJwksRepository, _eventPublisher.Object, new TestOutputLogger("test", outputHelper)); }
public GetTokenViaImplicitWorkflowOperation( IClientStore clientStore, IConsentRepository consentRepository, IAuthorizationCodeStore authorizationCodeStore, ITokenStore tokenStore, IScopeRepository scopeRepository, IJwksStore jwksStore, IEventPublisher eventPublisher, ILogger logger) { _logger = logger; _processAuthorizationRequest = new ProcessAuthorizationRequest( clientStore, consentRepository, jwksStore, logger); _generateAuthorizationResponse = new GenerateAuthorizationResponse( authorizationCodeStore, tokenStore, scopeRepository, clientStore, consentRepository, jwksStore, eventPublisher, logger); }
public DisplayConsentAction( IScopeRepository scopeRepository, IClientStore clientRepository, IConsentRepository consentRepository, IAuthorizationCodeStore authorizationCodeStore, ITokenStore tokenStore, IJwksStore jwksStore, IEventPublisher eventPublisher, ILogger logger) { _scopeRepository = scopeRepository; _clientRepository = clientRepository; _consentRepository = consentRepository; _generateAuthorizationResponse = new GenerateAuthorizationResponse( authorizationCodeStore, tokenStore, scopeRepository, clientRepository, consentRepository, jwksStore, eventPublisher, logger); }
public AuthenticateHelper( IAuthorizationCodeStore authorizationCodeStore, ITokenStore tokenStore, IScopeRepository scopeRepository, IConsentRepository consentRepository, IClientStore clientRepository, IJwksStore jwksStore, IEventPublisher eventPublisher, ILogger logger) { _generateAuthorizationResponse = new GenerateAuthorizationResponse( authorizationCodeStore, tokenStore, scopeRepository, clientRepository, consentRepository, jwksStore, eventPublisher, logger); _consentRepository = consentRepository; _clientRepository = clientRepository; _logger = logger; }