public ClientConfigurationCorsPolicyRegistration(MongoDbServiceOptions options) { if (options == null) { throw new ArgumentNullException("options"); } this.AdditionalRegistrations.Add(new Registration <ClientConfigurationDbContext>(resolver => new ClientConfigurationDbContext(options.ConnectionString, options.Schema))); }
public TokenCleanup(MongoDbServiceOptions options, int interval = 60) { if (options == null) throw new ArgumentNullException("options"); if (interval < 1) throw new ArgumentException("interval must be more than 1 second"); _options = options; _interval = TimeSpan.FromSeconds(interval); }
public static void RegisterOperationalServices(this IdentityServerServiceFactory factory, MongoDbServiceOptions options) { if (factory == null) throw new ArgumentNullException("factory"); if (options == null) throw new ArgumentNullException("options"); factory.Register(new Registration<OperationalDbContext>(resolver => new OperationalDbContext(options.ConnectionString, options.Schema))); factory.AuthorizationCodeStore = new Registration<IAuthorizationCodeStore, AuthorizationCodeStore>(); factory.TokenHandleStore = new Registration<ITokenHandleStore, TokenHandleStore>(); factory.ConsentStore = new Registration<IConsentStore, ConsentStore>(); factory.RefreshTokenStore = new Registration<IRefreshTokenStore, RefreshTokenStore>(); }
public TokenCleanup(MongoDbServiceOptions options, int interval = 60) { if (options == null) { throw new ArgumentNullException("options"); } if (interval < 1) { throw new ArgumentException("interval must be more than 1 second"); } _options = options; _interval = TimeSpan.FromSeconds(interval); }