You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
1 year ago | |
|---|---|---|
| .. | ||
| LINGYUN/Abp/IdentityServer | 2 years ago | |
| FodyWeavers.xml | 4 years ago | |
| FodyWeavers.xsd | 4 years ago | |
| LINGYUN.Abp.IdentityServer.EntityFrameworkCore.csproj | 2 years ago | |
| README.EN.md | 1 year ago | |
| README.md | 1 year ago | |
README.md
LINGYUN.Abp.IdentityServer.EntityFrameworkCore
IdentityServer EntityFrameworkCore模块,提供IdentityServer4的Entity Framework Core实现。
功能特性
-
仓储实现
-
API资源仓储 -
EfCoreApiResourceRepository- 获取API资源名称列表
- 继承自ABP框架的API资源仓储基类
-
身份资源仓储 -
EfCoreIdentityResourceRepository- 继承自ABP框架的身份资源仓储基类
-
持久授权仓储 -
EfCorePersistentGrantRepository- 继承自ABP框架的持久授权仓储基类
-
-
数据库上下文
- 使用ABP框架的
IIdentityServerDbContext - 支持多租户数据隔离
- 使用ABP框架的
模块引用
[DependsOn(
typeof(AbpIdentityServerEntityFrameworkCoreModule)
)]
public class YourModule : AbpModule
{
// ...
}
依赖模块
LINGYUN.Abp.IdentityServer.AbpIdentityServerDomainModule- IdentityServer领域模块Volo.Abp.IdentityServer.EntityFrameworkCore.AbpIdentityServerEntityFrameworkCoreModule- ABP IdentityServer EntityFrameworkCore模块
配置使用
配置数据库上下文
public class YourDbContext : AbpDbContext<YourDbContext>, IIdentityServerDbContext
{
public DbSet<ApiResource> ApiResources { get; set; }
public DbSet<ApiScope> ApiScopes { get; set; }
public DbSet<IdentityResource> IdentityResources { get; set; }
public DbSet<Client> Clients { get; set; }
public DbSet<PersistedGrant> PersistedGrants { get; set; }
public DbSet<DeviceFlowCodes> DeviceFlowCodes { get; set; }
public YourDbContext(DbContextOptions<YourDbContext> options)
: base(options)
{
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
modelBuilder.ConfigureIdentityServer();
}
}
相关文档: