首頁>Club>
12
回覆列表
  • 1 # 使用者9866520236700

    // 使用者

    public class User

    {

    public int ID {get;set}

    public string Name {get;set;}

    public string Password {get;set;}

    }

    // 覆蓋ClaimsIdentity

    private ClaimsIdentity CreateIdentity(User user, string authenticationType)

    {

    ClaimsIdentity _identity = new ClaimsIdentity(DefaultAuthenticationTypes.ApplicationCookie);

    _identity.AddClaim(new Claim(ClaimTypes.Name, user.Name));

    _identity.AddClaim(new Claim("http://schemas.microsoft.com/accesscontrolservice/2010/07/claims/identityprovider", "ASP.NET Identity"));

    return _identity;

    }

  • 中秋節和大豐收的關聯?
  • 高鐵磁卡票不是本次列車能從檢票口進嗎?