/// <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>
 public DefaultTokenService(IdentityServerOptions options, IClaimsProvider claimsProvider, ITokenHandleStore tokenHandles, ITokenSigningService signingService)
 {
     _options        = options;
     _claimsProvider = claimsProvider;
     _tokenHandles   = tokenHandles;
     _signingService = signingService;
 }
 public DefaultTokenService(IdentityServerOptions options, IClaimsProvider claimsProvider, ITokenHandleStore tokenHandles, ITokenSigningService signingService)
 {
     _options = options;
     _claimsProvider = claimsProvider;
     _tokenHandles = tokenHandles;
     _signingService = signingService;
 }
 public DefaultTokenService(IUserService users, CoreSettings settings, IClaimsProvider claimsProvider, ITokenHandleStore tokenHandles, ITokenSigningService signingService)
 {
     _users = users;
     _settings = settings;
     _claimsProvider = claimsProvider;
     _tokenHandles = tokenHandles;
     _signingService = signingService;
 }
Пример #4
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;
        }
Пример #5
0
 public TokenService(
     IdentityServerOptions options,
     IClaimsProvider claimsProvider,
     ITokenHandleStore tokenHandles,
     ITokenSigningService signingService,
     IEventService events)
     : base(options, claimsProvider, tokenHandles, signingService, 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;
 }
Пример #7
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;
        }
 /// <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="issuerUri">The issuer url.</param>
 public DefaultTokenService(IdentityServerOptions options, IClaimsProvider claimsProvider, ITokenHandleStore tokenHandles, ITokenSigningService signingService, IEventService events, string issuerUri)
 {
     _options        = options;
     _claimsProvider = claimsProvider;
     _tokenHandles   = tokenHandles;
     _signingService = signingService;
     _events         = events;
     _issuerUri      = issuerUri;
     _wsUri          = OwinEnvironmentExtensions.GetWebServiceUriFromIssuerUri(issuerUri);
 }
Пример #9
0
 public ComoRequestValidator(IRequestValidatorHelper requestValidatorHelper, IdentityServerOptions options, ITokenSigningService signingService)
 {
     if (requestValidatorHelper == null)
     {
         throw new ArgumentNullException("requestValidatorHelper");
     }
     if (options == null)
     {
         throw new ArgumentNullException("options");
     }
     if (signingService == null)
     {
         throw new ArgumentNullException("signingService");
     }
     _requestValidatorHelper = requestValidatorHelper;
     _options        = options;
     _signingService = signingService;
 }
 public MyCustomTokenService(IdentityServerOptions options, IClaimsProvider claimsProvider, ITokenHandleStore tokenHandles, ITokenSigningService signingService, IEventService events)
     :base(options, claimsProvider, tokenHandles, signingService, events)
 {
     _tokenHandleStore = tokenHandles;
 }
Пример #11
0
 /// <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;
 }
 /// <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 events service.</param>
 /// <param name="owinEnvironmentService">The OWIN environment service.</param>
 public DefaultTokenService(IdentityServerOptions options, IClaimsProvider claimsProvider, ITokenHandleStore tokenHandles, ITokenSigningService signingService, IEventService events, OwinEnvironmentService owinEnvironmentService)
     : this(options, claimsProvider, tokenHandles, signingService, events, new OwinContext(owinEnvironmentService.Environment).GetIdentityServerIssuerUri())
 {
 }
Пример #13
0
 public static ComoRequestValidator CreateComoRequestValidator(IRequestValidatorHelper requestValidatorHelper, IdentityServerOptions options = null, ITokenSigningService signingService = null)
 {
     if (options == null)
     {
         options = TestIdentityServerOptions.Create();
     }
     if (signingService == null)
     {
         signingService = new DefaultTokenSigningService(options);
     }
     if (requestValidatorHelper == null)
     {
         requestValidatorHelper = new Mock <IRequestValidatorHelper>().Object;
     }
     return(new ComoRequestValidator(requestValidatorHelper, options, signingService));
 }