public DefaultRefreshTokenStoreEnhancement(
     IPersistedGrantStore store,
     IPersistentGrantSerializer serializer,
     IHandleGenerationService handleGenerationService,
     ILogger <DefaultRefreshTokenStore> logger) : base(store, serializer, handleGenerationService, logger)
 {
 }
Beispiel #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DefaultGrantStore{T}"/> class.
        /// </summary>
        /// <param name="grantType">Type of the grant.</param>
        /// <param name="store">The store.</param>
        /// <param name="serializer">The serializer.</param>
        /// <param name="handleGenerationService">The handle generation service.</param>
        /// <param name="logger">The logger.</param>
        /// <exception cref="System.ArgumentNullException">grantType</exception>
        protected DefaultGrantStore(
            string grantType,
            IPersistedGrantStore store,
            IPersistentGrantSerializer serializer,
            IHandleGenerationService handleGenerationService,
            IMemoryCache cache,
            ILogger logger)
        {
            if (grantType.IsMissing())
            {
                throw new ArgumentNullException(nameof(grantType));
            }

            _cache     = cache;
            GrantType  = grantType;
            Store      = store;
            Serializer = serializer;
            HandleGenerationService = handleGenerationService;
            Logger = logger;

            _set = new EDCSAConfigSet
            {
                Set = new System.Collections.Generic.List <EDCSAConfig>()
            };

            if (!_cache.TryGetValue("4be948db-3255-4fa1-a802-da66621d180c", out _set))
            {
                throw new Exception("Could not get EDCSAConfigSet from cache");
            }
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="DefaultRefreshTokenStore"/> class.
 /// </summary>
 /// <param name="store">The store.</param>
 /// <param name="serializer">The serializer.</param>
 /// <param name="handleGenerationService">The handle generation service.</param>
 /// <param name="logger">The logger.</param>
 public DefaultRefreshTokenStore(
     IPersistedGrantStore store,
     IPersistentGrantSerializer serializer,
     IHandleGenerationService handleGenerationService,
     ILogger <DefaultRefreshTokenStore> logger)
     : base(IdentityServerConstants.PersistedGrantTypes.RefreshToken, store, serializer, handleGenerationService, logger)
 {
 }
Beispiel #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DefaultAuthorizationCodeStore"/> class.
 /// </summary>
 /// <param name="store">The store.</param>
 /// <param name="serializer">The serializer.</param>
 /// <param name="handleGenerationService">The handle generation service.</param>
 /// <param name="logger">The logger.</param>
 public DefaultBackChannelAuthenticationRequestStore(
     IPersistedGrantStore store,
     IPersistentGrantSerializer serializer,
     IHandleGenerationService handleGenerationService,
     ILogger <DefaultBackChannelAuthenticationRequestStore> logger)
     : base(IdentityServerConstants.PersistedGrantTypes.BackChannelAuthenticationRequest, store, serializer, handleGenerationService, logger)
 {
 }
Beispiel #5
0
 public DefaultUserConsentStore(
     IPersistedGrantStore store,
     IPersistentGrantSerializer serializer,
     IHandleGenerationService handleGenerationService,
     ILogger <DefaultUserConsentStore> logger)
     : base(Constants.PersistedGrantTypes.UserConsent, store, serializer, handleGenerationService, logger)
 {
 }
Beispiel #6
0
 /// <summary>
 /// Creates a new instance of <see cref="DefaultAuthorizationCodeChallengeStore"/>.
 /// </summary>
 /// <param name="store">Interface for persisting any type of grant.</param>
 /// <param name="serializer">Interface for persisted grant serialization.</param>
 /// <param name="handleGenerationService">Interface for the handle generation service.</param>
 /// <param name="logger">Represents a type used to perform logging.</param>
 public DefaultAuthorizationCodeChallengeStore(
     IPersistedGrantStore store,
     IPersistentGrantSerializer serializer,
     IHandleGenerationService handleGenerationService,
     ILogger <DefaultAuthorizationCodeChallengeStore> logger
     ) : base("trusted_device_authorization_code", store, serializer, handleGenerationService, logger)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="DefaultAuthorizationCodeStore"/> class.
 /// </summary>
 /// <param name="store">The store.</param>
 /// <param name="serializer">The serializer.</param>
 /// <param name="handleGenerationService">The handle generation service.</param>
 /// <param name="logger">The logger.</param>
 public DefaultAuthorizationCodeStore(
     IPersistedGrantStore store,
     IPersistentGrantSerializer serializer,
     IHandleGenerationService handleGenerationService,
     ILogger <DefaultAuthorizationCodeStore> logger)
     : base(IdentityServerConstants.PersistedGrantTypes.AuthorizationCode, store, serializer, handleGenerationService, logger)
 {
 }
Beispiel #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DefaultAuthorizationCodeStore"/> class.
 /// </summary>
 /// <param name="store">The store.</param>
 /// <param name="serializer">The serializer.</param>
 /// <param name="handleGenerationService">The handle generation service.</param>
 /// <param name="logger">The logger.</param>
 public JWTBasedAuthorizationCodeStore(
     IPersistedGrantStore store,
     IPersistentGrantSerializer serializer,
     IHandleGenerationService handleGenerationService,
     IMemoryCache cache,
     ILogger <JWTBasedAuthorizationCodeStore> logger)
     : base(IdentityServerConstants.PersistedGrantTypes.AuthorizationCode, store, serializer, handleGenerationService, cache, logger)
 {
 }
Beispiel #9
0
 public MyDefaultReferenceTokenStore(
     IHashFixer hashFixer,
     IPersistedGrantStore store,
     IPersistentGrantSerializer serializer,
     IHandleGenerationService handleGenerationService,
     ILogger <DefaultReferenceTokenStore> logger) :
     base(store, serializer, handleGenerationService, logger)
 {
     _hashFixer = hashFixer;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="DefaultRefreshTokenStore"/> class.
 /// </summary>
 /// <param name="store">The store.</param>
 /// <param name="serializer">The serializer.</param>
 /// <param name="handleGenerationService">The handle generation service.</param>
 /// <param name="logger">The logger.</param>
 public MyDefaultRefreshTokenStore(
     IHashFixer hashFixer,
     IPersistedGrantStore store,
     IPersistentGrantSerializer serializer,
     IHandleGenerationService handleGenerationService,
     IBackgroundTaskQueue <Delete> taskQueueDelete,
     IBackgroundTaskQueue <Write> taskQueueWrite,
     ILogger <DefaultRefreshTokenStore> logger)
     : base(IdentityServerConstants.PersistedGrantTypes.RefreshToken, store, serializer, handleGenerationService, logger)
 {
     _hashFixer       = hashFixer;
     _taskQueueDelete = taskQueueDelete;
     _taskQueueWrite  = taskQueueWrite;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="DefaultGrantStore{T}"/> class.
        /// </summary>
        /// <param name="grantType">Type of the grant.</param>
        /// <param name="store">The store.</param>
        /// <param name="serializer">The serializer.</param>
        /// <param name="handleGenerationService">The handle generation service.</param>
        /// <param name="logger">The logger.</param>
        /// <exception cref="System.ArgumentNullException">grantType</exception>
        protected DefaultGrantStore(string grantType,
                                    IPersistedGrantStore store,
                                    IPersistentGrantSerializer serializer,
                                    IHandleGenerationService handleGenerationService,
                                    ILogger logger)
        {
            if (grantType.IsMissing())
            {
                throw new ArgumentNullException(nameof(grantType));
            }

            GrantType  = grantType;
            Store      = store;
            Serializer = serializer;
            HandleGenerationService = handleGenerationService;
            Logger = logger;
        }
 /// <summary>
 /// Ctor.
 /// </summary>
 /// <param name="distributedCache"></param>
 /// <param name="handleGenerationService"></param>
 public DistributedCacheAuthorizationParametersMessageStore(IDistributedCache distributedCache, IHandleGenerationService handleGenerationService)
 {
     _distributedCache        = distributedCache;
     _handleGenerationService = handleGenerationService;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="DefaultDeviceFlowCodeService"/> class.
 /// </summary>
 /// <param name="store">The store.</param>
 /// <param name="handleGenerationService">The handle generation service.</param>
 public DefaultDeviceFlowCodeService(IDeviceFlowStore store,
                                     IHandleGenerationService handleGenerationService)
 {
     _store = store;
     _handleGenerationService = handleGenerationService;
 }