/// <summary> /// Initializes a new instance of the <see cref="DeviceFlowStore"/> class. /// </summary> /// <param name="context">The context.</param> /// <param name="serializer">The serializer</param> /// <param name="logger">The logger.</param> public DeviceFlowStore( IPersistedGrantContext context, IPersistentGrantSerializer serializer, ILogger <DeviceFlowStore> logger) { Context = context ?? throw new ArgumentNullException(nameof(context)); Serializer = serializer; Logger = logger; }
/// <summary> /// Constructor for TokenCleanupService. /// </summary> /// <param name="options"></param> /// <param name="persistedGrantDbContext"></param> /// <param name="operationalStoreNotification"></param> /// <param name="logger"></param> public TokenCleanupService( OperationalStoreOptions options, IPersistedGrantContext persistedGrantDbContext, ILogger <TokenCleanupService> logger, IOperationalStoreNotification operationalStoreNotification = null) { _options = options ?? throw new ArgumentNullException(nameof(options)); if (_options.TokenCleanupBatchSize < 1) { throw new ArgumentException("Token cleanup batch size interval must be at least 1"); } _persistedGrantDbContext = persistedGrantDbContext ?? throw new ArgumentNullException(nameof(persistedGrantDbContext)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _operationalStoreNotification = operationalStoreNotification; }
/// <summary> /// Initializes a new instance of the <see cref="PersistedGrantStore"/> class. /// </summary> /// <param name="context">The context.</param> /// <param name="logger">The logger.</param> public PersistedGrantStore(IPersistedGrantContext context, ILogger <PersistedGrantStore> logger) { Context = context ?? throw new ArgumentNullException(nameof(context)); Logger = logger; }