草庐IT

NameClaimType

全部标签

c# - 如何使用 OWIN 安全中间件在应用程序中设置 NameClaimType

我已经创建了一个OWINWeb应用程序,它使用OpenIdConnect通过Microsoft.Owin.Security.OpenIdConnect进行身份验证。虽然身份验证有效,但我发现创建的ClaimsIdentity.Name成员为空。ClaimsIdentity似乎希望在声明中提供名称:http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name但是,ThinktectureIdentityServerv3提供的名称只是:nameIfindthisisconfigurableviaNameClaimTypeinolder