public DiscoveryEndpoint(IdentityServerOptions options, IdentityServerContext context, IScopeStore scopes, ILogger <DiscoveryEndpoint> logger, ISigningKeyService keyService, CustomGrantValidator customGrants, SecretParser parsers) { _options = options; _scopes = scopes; _logger = logger; _keyService = keyService; _context = context; _customGrants = customGrants; _parsers = parsers; }
public static TokenRequestValidator CreateTokenRequestValidator( IdentityServerOptions options = null, IScopeStore scopes = null, IAuthorizationCodeStore authorizationCodeStore = null, IRefreshTokenStore refreshTokens = null, IResourceOwnerPasswordValidator resourceOwnerValidator = null, IProfileService profile = null, IEnumerable <ICustomGrantValidator> customGrantValidators = null, ICustomRequestValidator customRequestValidator = null, ScopeValidator scopeValidator = null) { if (options == null) { options = TestIdentityServerOptions.Create(); } if (scopes == null) { scopes = new InMemoryScopeStore(TestScopes.Get()); } if (resourceOwnerValidator == null) { resourceOwnerValidator = new TestResourceOwnerPasswordValidator(); } if (profile == null) { profile = new TestProfileService(); } if (customRequestValidator == null) { customRequestValidator = new DefaultCustomRequestValidator(); } CustomGrantValidator aggregateCustomValidator; if (customGrantValidators == null) { aggregateCustomValidator = new CustomGrantValidator(new [] { new TestGrantValidator() }, TestLogger.Create <CustomGrantValidator>()); } else { aggregateCustomValidator = new CustomGrantValidator(customGrantValidators, TestLogger.Create <CustomGrantValidator>()); } if (refreshTokens == null) { refreshTokens = new InMemoryRefreshTokenStore(); } if (scopeValidator == null) { scopeValidator = new ScopeValidator(scopes, new LoggerFactory().CreateLogger <ScopeValidator>()); } var idsvrContext = IdentityServerContextHelper.Create(); return(new TokenRequestValidator( options, authorizationCodeStore, refreshTokens, resourceOwnerValidator, profile, aggregateCustomValidator, customRequestValidator, scopeValidator, new TestEventService(), TestLogger.Create <TokenRequestValidator>())); }
public static TokenRequestValidator CreateTokenRequestValidator( IdentityServerOptions options = null, IScopeStore scopes = null, IAuthorizationCodeStore authorizationCodeStore = null, IRefreshTokenStore refreshTokens = null, IUserService userService = null, IEnumerable <ICustomGrantValidator> customGrantValidators = null, ICustomRequestValidator customRequestValidator = null, ScopeValidator scopeValidator = null) { if (options == null) { options = TestIdentityServerOptions.Create(); } if (scopes == null) { scopes = new InMemoryScopeStore(TestScopes.Get()); } if (userService == null) { userService = new TestUserService(); } if (customRequestValidator == null) { customRequestValidator = new DefaultCustomRequestValidator(); } CustomGrantValidator aggregateCustomValidator; if (customGrantValidators == null) { aggregateCustomValidator = new CustomGrantValidator(new [] { new TestGrantValidator() }, new Logger <CustomGrantValidator>(new LoggerFactory())); } else { aggregateCustomValidator = new CustomGrantValidator(customGrantValidators, new Logger <CustomGrantValidator>(new LoggerFactory())); } if (refreshTokens == null) { refreshTokens = new InMemoryRefreshTokenStore(); } if (scopeValidator == null) { scopeValidator = new ScopeValidator(scopes, new LoggerFactory()); } return(new TokenRequestValidator( options, authorizationCodeStore, refreshTokens, userService, aggregateCustomValidator, customRequestValidator, scopeValidator, new DefaultEventService(new LoggerFactory()), new LoggerFactory())); }
public DiscoveryEndpointController(IdentityServerOptions options, IScopeStore scopes, IOwinContext context, ISigningKeyService keyService, CustomGrantValidator customGrants) { _options = options; _scopes = scopes; _context = context; _keyService = keyService; _customGrants = customGrants; }
public DiscoveryEndpoint(IdentityServerOptions options, IdentityServerContext context, IScopeStore scopes, ILogger <DiscoveryEndpoint> logger, IEnumerable <IValidationKeysStore> keys, CustomGrantValidator customGrants, SecretParser parsers) { _options = options; _scopes = scopes; _logger = logger; _context = context; _customGrants = customGrants; _parsers = parsers; _keys = keys; }