【问题标题】:Adding custom properties to ASP.NET Identity with IdentityServer3使用 IdentityServer3 向 ASP.NET Identity 添加自定义属性
【发布时间】:2015-08-03 03:17:28
【问题描述】:

使用带有 ASP.NET Identity 的 IdentityServer3 作为 OAuth 服务器,我可以在令牌响应中返回角色和声明。如果我想覆盖 IdentityUser 并添加 LastName,我将如何在令牌响应中返回它?还是我需要将 LastName 添加到 AspNetUserClaims 表而不是 IdentityUser 对象/AspNetUsers 表中?

【问题讨论】:

    标签: asp.net asp.net-identity-2 identityserver3


    【解决方案1】:

    看起来您可能必须覆盖 UserService 中的 GetClaimsForAuthenticateResult()。我尝试将 ClaimesIdentityFactory 添加到 UserManager,但它似乎实际上不再执行了。

    https://github.com/IdentityServer/IdentityServer3/issues/1204

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-11-18
      • 2011-04-16
      • 1970-01-01
      • 2013-07-25
      • 1970-01-01
      • 2015-03-09
      • 2018-08-06
      • 1970-01-01
      相关资源
      最近更新 更多