So based on IdentityServer3 documentation I can use Entity Framework to store clients, scope and operational data (documentation here)
I need to install nugget package using Install-Package IdentityServer3.EntityFramework
However I couldn't find any instruction on how to create database. What command or script I need to run in order to create underneath database
Same kind of question applies for User Store. I am planning to use Asp.Net identity to store user information. and I need to install Install-Package IdentityServer3.AspNetIdentity
package. No clear instruction on creating database structure
There are corresponding sample project EntityFramework and AspnetIdentity but can trust if these projects are using latest schema. Also sample projects creates database with sample data. I want the clean database structure.
答案 0 :(得分:1)
文档清楚地表明您负责数据库架构和迁移:https://identityserver.github.io/Documentation/docsv2/ef/migrations.html
答案 1 :(得分:0)
问题是关于初始设置,而不是IdSrvr将被增强的时候。
为identityServer3.EntityFramework添加nuget(选择您的版本。)。在你的DbContext类中添加:
public DbSet<Client> Clients { get; set; }
public DbSet<ClientClaim> ClientClaims { get; set; }
public DbSet<ClientSecret> ClientSecrets { get; set; }
public DbSet<Consent> Consents { get; set; }
public DbSet<Scope> Scopes { get; set; }
public DbSet<ScopeClaim> ScopeClaims { get; set; }
在控制台中运行add migration命令,您将看到初始迁移。