Пример #1
0
 /// <summary>
 /// ctor
 /// </summary>
 /// <param name="accessTokenManagementOptions"></param>
 /// <param name="oidcOptions"></param>
 /// <param name="schemeProvider"></param>
 public DefaultTokenClientConfigurationService(
     IOptions <AccessTokenManagementOptions> accessTokenManagementOptions,
     IOptionsMonitor <OpenIdConnectOptions> oidcOptions,
     IAuthenticationSchemeProvider schemeProvider)
 {
     _accessTokenManagementOptions = accessTokenManagementOptions.Value;
     _oidcOptions    = oidcOptions;
     _schemeProvider = schemeProvider;
 }
        /// <summary>
        /// ctor
        /// </summary>
        /// <param name="accessTokenManagementOptions"></param>
        /// <param name="oidcOptions"></param>
        /// <param name="schemeProvider"></param>
        /// <param name="httpClientFactory"></param>
        public TokenEndpointService(
            IOptions <AccessTokenManagementOptions> accessTokenManagementOptions,
            IOptionsMonitor <OpenIdConnectOptions> oidcOptions,
            IAuthenticationSchemeProvider schemeProvider,
            IHttpClientFactory httpClientFactory)
        {
            _accessTokenManagementOptions = accessTokenManagementOptions.Value;

            _oidcOptions    = oidcOptions;
            _schemeProvider = schemeProvider;
            _httpClient     = httpClientFactory.CreateClient(AccessTokenManagementDefaults.BackChannelHttpClientName);
        }
        /// <summary>
        /// ctor
        /// </summary>
        /// <param name="accessTokenManagementOptions"></param>
        /// <param name="oidcOptions"></param>
        /// <param name="schemeProvider"></param>
        /// <param name="httpClient"></param>
        public TokenEndpointService(
            IOptions <AccessTokenManagementOptions> accessTokenManagementOptions,
            IOptionsSnapshot <OpenIdConnectOptions> oidcOptions,
            IAuthenticationSchemeProvider schemeProvider,
            HttpClient httpClient)
        {
            _accessTokenManagementOptions = accessTokenManagementOptions.Value;

            _oidcOptions    = oidcOptions;
            _schemeProvider = schemeProvider;
            _httpClient     = httpClient;
        }
Пример #4
0
 /// <summary>
 /// ctor
 /// </summary>
 /// <param name="userTokenStore"></param>
 /// <param name="clock"></param>
 /// <param name="options"></param>
 /// <param name="tokenEndpointService"></param>
 /// <param name="logger"></param>
 public UserAccessAccessTokenManagementService(
     IUserTokenStore userTokenStore,
     ISystemClock clock,
     IOptions <AccessTokenManagementOptions> options,
     ITokenEndpointService tokenEndpointService,
     ILogger <UserAccessAccessTokenManagementService> logger)
 {
     _userTokenStore       = userTokenStore;
     _clock                = clock;
     _options              = options.Value;
     _tokenEndpointService = tokenEndpointService;
     _logger               = logger;
 }
Пример #5
0
 /// <summary>
 /// ctor
 /// </summary>
 /// <param name="userTokenStore"></param>
 /// <param name="clock"></param>
 /// <param name="options"></param>
 /// <param name="tokenEndpointService"></param>
 /// <param name="clientAccessTokenCache"></param>
 /// <param name="httpContextAccessor"></param>
 /// <param name="logger"></param>
 public AccessTokenManagementService(
     IUserTokenStore userTokenStore,
     ISystemClock clock,
     IOptions <AccessTokenManagementOptions> options,
     ITokenEndpointService tokenEndpointService,
     IClientAccessTokenCache clientAccessTokenCache,
     IHttpContextAccessor httpContextAccessor,
     ILogger <AccessTokenManagementService> logger)
 {
     _userTokenStore         = userTokenStore;
     _clock                  = clock;
     _options                = options.Value;
     _tokenEndpointService   = tokenEndpointService;
     _clientAccessTokenCache = clientAccessTokenCache;
     _httpContextAccessor    = httpContextAccessor;
     _logger                 = logger;
 }
Пример #6
0
 /// <summary>
 /// ctor
 /// </summary>
 /// <param name="cache"></param>
 /// <param name="options"></param>
 /// <param name="logger"></param>
 public ClientAccessTokenCache(IDistributedCache cache, IOptions <AccessTokenManagementOptions> options, ILogger <ClientAccessTokenCache> logger)
 {
     _cache   = cache;
     _logger  = logger;
     _options = options.Value;
 }