public DefaultTokenService(IdentityServerOptions options, IClaimsProvider claimsProvider, ITokenHandleStore tokenHandles, ITokenSigningService signingService)
 {
     _options = options;
     _claimsProvider = claimsProvider;
     _tokenHandles = tokenHandles;
     _signingService = signingService;
 }
 public DefaultTokenService(IUserService users, ICoreSettings settings, IClaimsProvider claimsProvider, ITokenHandleStore tokenHandles)
 {
     _users = users;
     _settings = settings;
     _claimsProvider = claimsProvider;
     _tokenHandles = tokenHandles;
 }
 public TokenValidator(ICoreSettings settings, IUserService users, ITokenHandleStore tokenHandles, ILogger logger)
 {
     _settings = settings;
     _users = users;
     _tokenHandles = tokenHandles;
     _logger = logger;
 }
 public AuthorizeResponseGenerator(ITokenService tokenService, IAuthorizationCodeStore authorizationCodes, ITokenHandleStore tokenHandles, ICoreSettings settings)
 {
     _tokenService = tokenService;
     _authorizationCodes = authorizationCodes;
     _tokenHandles = tokenHandles;
     _settings = settings;
 }
 public TokenResponseGenerator(ITokenService tokenService, IRefreshTokenService refreshTokenService, ITokenHandleStore tokenHandles, CoreSettings settings, IAuthorizationCodeStore codes)
 {
     _settings = settings;
     _tokenService = tokenService;
     _refreshTokenService = refreshTokenService;
     _tokenHandles = tokenHandles;
 }
 public TokenValidator(IdentityServerOptions options, IClientStore clients, ITokenHandleStore tokenHandles, ICustomTokenValidator customValidator)
 {
     _options = options;
     _clients = clients;
     _tokenHandles = tokenHandles;
     _customValidator = customValidator;
 }
 public TokenValidator(CoreSettings settings, IUserService users, IClientService clients, ITokenHandleStore tokenHandles, ICustomTokenValidator customValidator)
 {
     _settings = settings;
     _users = users;
     _clients = clients;
     _tokenHandles = tokenHandles;
     _customValidator = customValidator;
 }
        public RevocationRequestValidation()
        {
            _refreshTokens = new InMemoryRefreshTokenStore();
            _tokenHandles = new InMemoryTokenHandleStore();
            _clients = new InMemoryClientStore(TestClients.Get());

            _validator = new TokenRevocationRequestValidator();
        }
 public RevocationEndpointController(IdentityServerOptions options, ClientSecretValidator clientValidator, TokenRevocationRequestValidator requestValidator, ITokenHandleStore tokenHandles, IRefreshTokenStore refreshTokens, IEventService events)
 {
     _options = options;
     _clientValidator = clientValidator;
     _requestValidator = requestValidator;
     _tokenHandles = tokenHandles;
     _refreshTokens = refreshTokens;
     _events = events;
 }
        // todo
        //protected readonly OwinEnvironmentService _owinEnvironmentService;

        /// <summary>
        /// Initializes a new instance of the <see cref="DefaultTokenService" /> class. This overloaded constructor is deprecated and will be removed in 3.0.0.
        /// </summary>
        /// <param name="options">The options.</param>
        /// <param name="claimsProvider">The claims provider.</param>
        /// <param name="tokenHandles">The token handles.</param>
        /// <param name="signingService">The signing service.</param>
        /// <param name="events">The events service.</param>
        public DefaultTokenService(IdentityServerContext context, IClaimsProvider claimsProvider, ITokenHandleStore tokenHandles, ITokenSigningService signingService, IEventService events, ILoggerFactory loggerFactory)
        {
            _logger = loggerFactory.CreateLogger<DefaultTokenService>();
            _context = context;
            _claimsProvider = claimsProvider;
            _tokenHandles = tokenHandles;
            _signingService = signingService;
            _events = events;
        }
        public TokenValidator(IdentityServerOptions options, IClientStore clients, ITokenHandleStore tokenHandles, ICustomTokenValidator customValidator, OwinEnvironmentService owinEnvironment)
        {
            _options = options;
            _clients = clients;
            _tokenHandles = tokenHandles;
            _customValidator = customValidator;
            _context = new OwinContext(owinEnvironment.Environment);

            _log = new TokenValidationLog();
        }
 public FranceConnectTokenValidator(IdentityServerOptions options, IdentityServerContext context, IClientStore clients, ITokenHandleStore tokenHandles, ICustomTokenValidator customValidator, IEnumerable<IValidationKeysStore> keys, ILogger<TokenValidator> logger)
 {
     _options = options;
     _context = context;
     _clients = clients;
     _tokenHandles = tokenHandles;
     _customValidator = customValidator;
     _keys = keys;
     _logger = logger;
 }
Example #13
0
        public TokenValidator(IdentityServerOptions options, IdentityServerContext context, IClientStore clients, ITokenHandleStore tokenHandles, ICustomTokenValidator customValidator, ISigningKeyService keyService, ILogger<TokenValidator> logger)
        {
            _options = options;
            _context = context;
            _clients = clients;
            _tokenHandles = tokenHandles;
            _customValidator = customValidator;
            _keyService = keyService;
            _logger = logger;

            _log = new TokenValidationLog();
        }
 public AlwaysInvalidAccessTokenValidator(IdentityServerOptions options, IClientStore clients, ITokenHandleStore tokenHandles, ICustomTokenValidator customValidator, OwinEnvironmentService context)
     : base(options, clients, tokenHandles, customValidator, context)
 {
 }
Example #15
0
 public DefaultTokenService(IUserService users, CoreSettings settings, IClaimsProvider claimsProvider, ITokenHandleStore tokenHandles)
 {
     _users          = users;
     _settings       = settings;
     _claimsProvider = claimsProvider;
     _tokenHandles   = tokenHandles;
 }
 public TokenRevocationRequestValidator(ITokenHandleStore tokenHandles, IRefreshTokenStore refreshTokens)
 {
     _tokenHandles  = tokenHandles;
     _refreshTokens = refreshTokens;
 }
 public AlwaysInvalidIdentityTokenValidator(IdentityServerOptions options, IClientStore clients, ITokenHandleStore tokenHandles, ICustomTokenValidator customValidator, OwinEnvironmentService context)
     : base(options, clients, tokenHandles, customValidator, context, new DefaultSigningKeyService(options))
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="DefaultTokenService" /> class.
 /// </summary>
 /// <param name="options">The options.</param>
 /// <param name="claimsProvider">The claims provider.</param>
 /// <param name="tokenHandles">The token handles.</param>
 /// <param name="signingService">The signing service.</param>
 /// <param name="events">The OWIN environment service.</param>
 /// <param name="owinEnvironmentService">The events service.</param>
 public DefaultTokenService(IdentityServerOptions options, IClaimsProvider claimsProvider, ITokenHandleStore tokenHandles, ITokenSigningService signingService, IEventService events, OwinEnvironmentService owinEnvironmentService)
 {
     _options = options;
     _claimsProvider = claimsProvider;
     _tokenHandles = tokenHandles;
     _signingService = signingService;
     _events = events;
     _owinEnvironmentService = owinEnvironmentService;
 }
 public AlwaysInvalidAccessTokenValidator(IdentityServerOptions options, IClientStore clients, ITokenHandleStore tokenHandles, ICustomTokenValidator customValidator, OwinEnvironmentService context)
     : base(options, clients, tokenHandles, customValidator, context)
 {
 }
 public AlwaysInvalidAccessTokenValidator(IdentityServerOptions options, IClientStore clients, ITokenHandleStore tokenHandles, ICustomTokenValidator customValidator)
     : base(options, clients, tokenHandles, customValidator)
 {
 }
Example #21
0
        // todo
        //protected readonly OwinEnvironmentService _owinEnvironmentService;

        /// <summary>
        /// Initializes a new instance of the <see cref="DefaultTokenService" /> class. This overloaded constructor is deprecated and will be removed in 3.0.0.
        /// </summary>
        /// <param name="options">The options.</param>
        /// <param name="claimsProvider">The claims provider.</param>
        /// <param name="tokenHandles">The token handles.</param>
        /// <param name="signingService">The signing service.</param>
        /// <param name="events">The events service.</param>
        public DefaultTokenService(IdentityServerContext context, IClaimsProvider claimsProvider, ITokenHandleStore tokenHandles, ITokenSigningService signingService, IEventService events, ILoggerFactory loggerFactory)
        {
            _logger         = loggerFactory.CreateLogger <DefaultTokenService>();
            _context        = context;
            _claimsProvider = claimsProvider;
            _tokenHandles   = tokenHandles;
            _signingService = signingService;
            _events         = events;
        }
Example #22
0
        public static TokenValidator CreateTokenValidator(ITokenHandleStore tokenStore = null, IUserService users = null)
        {
            if (users == null)
            {
                users = new TestUserService();
            }

            var clients = CreateClientStore();

            var validator = new TokenValidator(
                options: TestIdentityServerOptions.Create(),
                clients: clients,
                tokenHandles: tokenStore,
                customValidator: new DefaultCustomTokenValidator(
                    users: users,
                    clients: clients));

            return validator;
        }
 public TokenResponseGenerator(ITokenService tokenService, ITokenHandleStore tokenHandles, ICoreSettings settings, IAuthorizationCodeStore codes)
 {
     _settings     = settings;
     _tokenService = tokenService;
     _tokenHandles = tokenHandles;
 }
Example #24
0
 public AuthorizeResponseGenerator(ITokenService tokenService, IAuthorizationCodeStore authorizationCodes, ITokenHandleStore tokenHandles, CoreSettings settings)
 {
     _tokenService       = tokenService;
     _authorizationCodes = authorizationCodes;
     _tokenHandles       = tokenHandles;
     _settings           = settings;
 }
 public KeyHashingTokenHandleStore(ITokenHandleStore inner)
     : base(inner)
 {
 }
        public TokenValidator(IdentityServerOptions options, IdentityServerContext context, IClientStore clients, ITokenHandleStore tokenHandles, ICustomTokenValidator customValidator, ISigningKeyService keyService, ILogger <TokenValidator> logger)
        {
            _options         = options;
            _context         = context;
            _clients         = clients;
            _tokenHandles    = tokenHandles;
            _customValidator = customValidator;
            _keyService      = keyService;
            _logger          = logger;

            _log = new TokenValidationLog();
        }
 public AlwaysInvalidIdentityTokenValidator(IdentityServerOptions options, IClientStore clients, ITokenHandleStore tokenHandles, ICustomTokenValidator customValidator)
     : base(options, clients, tokenHandles, customValidator)
 {
 }
Example #28
0
        public static TokenValidator CreateTokenValidator(ITokenHandleStore tokenStore = null, IProfileService profile = null)
        {
            if (profile == null)
            {
                profile = new TestProfileService();
            }

            var clients = CreateClientStore();
            var options = TestIdentityServerOptions.Create();

            var accessor = new HttpContextAccessor();
            accessor.HttpContext = new DefaultHttpContext();
            var idsrvContext = new IdentityServerContext(accessor, options);

            var logger = new Logger<TokenValidator>(new LoggerFactory());

            var validator = new TokenValidator(
                options: options,
                clients: clients,
                tokenHandles: tokenStore,
                customValidator: new DefaultCustomTokenValidator(
                    profile: profile,
                    clients: clients,
                    logger: new Logger<DefaultCustomTokenValidator>(new LoggerFactory())),
                keyService: new DefaultSigningKeyService(options),
                logger: logger,
                context: idsrvContext);

            return validator;
        }
Example #29
0
        // todo
        //protected readonly OwinEnvironmentService _owinEnvironmentService;

        /// <summary>
        /// Initializes a new instance of the <see cref="DefaultTokenService" /> class. This overloaded constructor is deprecated and will be removed in 3.0.0.
        /// </summary>
        /// <param name="options">The options.</param>
        /// <param name="claimsProvider">The claims provider.</param>
        /// <param name="tokenHandles">The token handles.</param>
        /// <param name="creationService">The signing service.</param>
        /// <param name="events">The events service.</param>
        public DefaultTokenService(IdentityServerContext context, IClaimsProvider claimsProvider, ITokenHandleStore tokenHandles, ITokenCreationService creationService, IEventService events, ILogger <DefaultTokenService> logger)
        {
            _logger          = logger;
            _context         = context;
            _claimsProvider  = claimsProvider;
            _tokenHandles    = tokenHandles;
            _creationService = creationService;
            _events          = events;
        }
Example #30
0
 public TokenValidator(CoreSettings settings, IUserService users, IClientService clients, ITokenHandleStore tokenHandles, ICustomTokenValidator customValidator)
 {
     _settings        = settings;
     _users           = users;
     _clients         = clients;
     _tokenHandles    = tokenHandles;
     _customValidator = customValidator;
 }
 public TokenValidator(IdentityServerOptions options, IUserService users, IClientStore clients, ITokenHandleStore tokenHandles, ICustomTokenValidator customValidator)
 {
     _options         = options;
     _users           = users;
     _clients         = clients;
     _tokenHandles    = tokenHandles;
     _customValidator = customValidator;
 }
 public MyCustomTokenService(IdentityServerOptions options, IClaimsProvider claimsProvider, ITokenHandleStore tokenHandles, ITokenSigningService signingService, IEventService events)
     :base(options, claimsProvider, tokenHandles, signingService, events)
 {
     _tokenHandleStore = tokenHandles;
 }
 public DefaultTokenService(IdentityServerOptions options, IClaimsProvider claimsProvider, ITokenHandleStore tokenHandles, ITokenSigningService signingService)
 {
     _options        = options;
     _claimsProvider = claimsProvider;
     _tokenHandles   = tokenHandles;
     _signingService = signingService;
 }
Example #34
0
        public static TokenValidator CreateTokenValidator(ITokenHandleStore tokenStore = null, IUserService users = null)
        {
            if (users == null)
            {
                users = new TestUserService();
            }

            var clients = CreateClientStore();
            var options = TestIdentityServerOptions.Create();
            options.Factory = new IdentityServerServiceFactory();
            var context = CreateOwinContext(options, clients, users);

            var validator = new TokenValidator(
                options: options,
                clients: clients,
                tokenHandles: tokenStore,
                customValidator: new DefaultCustomTokenValidator(
                    users: users,
                    clients: clients),
                owinEnvironment: new OwinEnvironmentService(context));

            return validator;
        }
 public RevocationEndpointController(IdentityServerOptions options, ClientSecretValidator clientValidator, TokenRevocationRequestValidator requestValidator, ITokenHandleStore tokenHandles, IRefreshTokenStore refreshTokens, IEventService events)
 {
     _options          = options;
     _clientValidator  = clientValidator;
     _requestValidator = requestValidator;
     _tokenHandles     = tokenHandles;
     _refreshTokens    = refreshTokens;
     _events           = events;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="DefaultTokenService" /> class.
 /// </summary>
 /// <param name="options">The options.</param>
 /// <param name="claimsProvider">The claims provider.</param>
 /// <param name="tokenHandles">The token handles.</param>
 /// <param name="signingService">The signing service.</param>
 /// <param name="events">The OWIN environment service.</param>
 /// <param name="owinEnvironmentService">The events service.</param>
 public DefaultTokenService(IdentityServerOptions options, IClaimsProvider claimsProvider, ITokenHandleStore tokenHandles, ITokenSigningService signingService, IEventService events, OwinEnvironmentService owinEnvironmentService)
 {
     _options                = options;
     _claimsProvider         = claimsProvider;
     _tokenHandles           = tokenHandles;
     _signingService         = signingService;
     _events                 = events;
     _owinEnvironmentService = owinEnvironmentService;
 }
 public AlwaysInvalidIdentityTokenValidator(IdentityServerOptions options, IClientStore clients, ITokenHandleStore tokenHandles, ICustomTokenValidator customValidator, OwinEnvironmentService context)
     : base(options, clients, tokenHandles, customValidator, context, new DefaultSigningKeyService(options))
 {
 }
Example #38
0
 public CustomTokenService(IdentityServerOptions options, IClaimsProvider claimsProvider, ITokenHandleStore tokenHandles, ITokenSigningService signingService, IEventService events)
     : base(options, claimsProvider, tokenHandles, signingService, events)
 {
 }
 public TokenRevocationRequestValidator(ITokenHandleStore tokenHandles, IRefreshTokenStore refreshTokens)
 {
     _tokenHandles = tokenHandles;
     _refreshTokens = refreshTokens;
 }