我试图在持久化数据库中使用IdentityServer4。我有甲骨文数据库。我计划扩展ConfigurationDbContext和PersistedGrantDbContext,以便进行一些特定于甲骨文的定制。
PersistedGrantDbContext
public class IdentityPersistedGrantDbContext : PersistedGrantDbContext {
public IdentityPersistedGrantDbContext(DbContextOptions<PersistedGrantDbContext> options, OperationalStoreOptions storeOptions)
: base(options, storeOptions) {
}
}ConfigurationDbContext
public class IdentityConfigurationDbContext : ConfigurationDbContext {
public IdentityConfigurationDbContext(DbContextOptions<ConfigurationDbContext> options, ConfigurationStoreOptions storeOptions)
: base(options, storeOptions) {
}
}在启动类中,我是否告诉IdentityServer使用自定义类?
发布于 2017-02-21 18:48:34
将IPersistedGrantStore实现为这里。并将其添加到ASP.NET核心ServiceCollection (也称为DI容器)中。
例:
services.AddTransient<IPersistedGrantStore, MyPersistedGrantStore>();其中,MyPersistedGrantStore使用该DbContext执行接口/契约中定义的CRUD操作。
发布于 2017-07-26 00:31:44
它位于IdghtyServer4.中。为IdentityServer4.EntityFramework.DbContexts添加一个using语句
https://stackoverflow.com/questions/42367893
复制相似问题