コード例 #1
0
        public ConsentStore(OperationalDbContext context)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }

            this.context = context;
        }
コード例 #2
0
        protected BaseTokenStore(OperationalDbContext context, TokenType tokenType, IScopeStore scopeStore, IClientStore clientStore)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }
            if (scopeStore == null)
            {
                throw new ArgumentNullException("scopeStore");
            }
            if (clientStore == null)
            {
                throw new ArgumentNullException("clientStore");
            }

            this.context     = context;
            this.tokenType   = tokenType;
            this.scopeStore  = scopeStore;
            this.clientStore = clientStore;
        }
コード例 #3
0
        private async Task ClearTokens()
        {
            try
            {
                Logger.Info("Clearing tokens");

                using (var db = new OperationalDbContext(this.options.ConnectionString, this.options.Schema))
                {
                    var query =
                        from token in db.Tokens
                        where token.Expiry < DateTimeOffset.UtcNow
                        select token;

                    db.Tokens.RemoveRange(query);

                    await db.SaveChangesAsync();
                }
            }
            catch (Exception ex)
            {
                Logger.ErrorException("Exception cleanring tokens", ex);
            }
        }
コード例 #4
0
        private async Task ClearTokens()
        {
            try
            {
                Logger.Info("Clearing tokens");

                using (var db = new OperationalDbContext(this.options.ConnectionString, this.options.Schema))
                {
                    var query =
                        from token in db.Tokens
                        where token.Expiry < DateTimeOffset.UtcNow
                        select token;

                    db.Tokens.RemoveRange(query);

                    await db.SaveChangesAsync();
                }
            }
            catch(Exception ex)
            {
                Logger.ErrorException("Exception cleanring tokens", ex);
            }
        }
 public RefreshTokenStore(OperationalDbContext context, IScopeStore scopeStore, IClientStore clientStore)
     : base(context, TokenType.RefreshToken, scopeStore, clientStore)
 {
 }
コード例 #6
0
 public ConsentStore(OperationalDbContext context)
 {
     if (context == null) throw new ArgumentNullException("context");
     
     this.context = context;
 }
 public AuthorizationCodeStore(OperationalDbContext context, IScopeStore scopeStore, IClientStore clientStore)
     : base(context, TokenType.AuthorizationCode, scopeStore, clientStore)
 {
 }
 public TokenHandleStore(OperationalDbContext context, IScopeStore scopeStore, IClientStore clientStore)
     : base(context, Entities.TokenType.TokenHandle, scopeStore, clientStore)
 {
 }