public ConsentStore(OperationalDbContext context) { if (context == null) { throw new ArgumentNullException("context"); } this.context = context; }
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; }
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); } }
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) { }
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) { }