Identityserver4 是否有git hub项目可供参考,以将现有用户Db引入identity server 4?如果有,请给我指一指

Identityserver4 是否有git hub项目可供参考,以将现有用户Db引入identity server 4?如果有,请给我指一指,identityserver4,Identityserver4,我在Sql server中内置了用户数据库,并根据应用程序的要求设置了许多列。如何在Identity server 4中使用此用户表?是否有任何git hub参考项目可以这样做?通过继承IdentityUser创建您自己的用户类。在那里,您可以添加自己的属性并覆盖现有属性(将它们映射到列名) public class ApplicationUser : IdentityUser { public ApplicationUser() { IsActive = tru

我在Sql server中内置了用户数据库,并根据应用程序的要求设置了许多列。如何在Identity server 4中使用此用户表?是否有任何git hub参考项目可以这样做?

通过继承
IdentityUser
创建您自己的用户类。在那里,您可以添加自己的属性并覆盖现有属性(将它们映射到列名)

public class ApplicationUser : IdentityUser
{
    public ApplicationUser()
    {
        IsActive = true;
    }

    // these two properties are your custom ones
    public int? StaffId { get; set; }
    public bool IsActive { get; set; }

    // here you map an Identity property to a column you already have
    [Column("LockoutEndDateUtc")]
    public override DateTimeOffset? LockoutEnd { get; set; }
}