【问题标题】:C# Security Claims Value OutdatedC# 安全声明值已过时
【发布时间】:2017-08-25 15:47:51
【问题描述】:

当我使用来自System.Security.Claims;ClaimTypes.Role 时,ClaimTypes 中的所有 URI 都丢失了。
例如ClaimTypes.Role = http://schemas.microsoft.com/ws/2008/06/identity/claims/role or ClaimTypes.Actor = http://schemas.microsoft.com/ws/2008/06/identity/claims/actor

URI 给出错误

您要查找的资源已被删除,有它的名字 已更改,或暂时不可用。

有人知道描述移动到哪里了吗?是否可以更新ClaimTypes 以指向正确的位置?

看微软的网站https://msdn.microsoft.com/en-us/library/system.security.claims.claimtypes.role(v=vs.110).aspx他们也给出了URIhttp://schemas.microsoft.com/ws/2008/06/identity/claims/role

【问题讨论】:

  • 为什么人们反对这个?不要打了就跑。

标签: c# asp.net-identity claims-based-identity


【解决方案1】:

不用担心文本,最佳做法是使用ClaimTypes.Role。字符串可以更改以反映日期,但对象不会更改,因此您不必担心代码重构。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2010-10-23
    • 1970-01-01
    • 2019-07-12
    • 1970-01-01
    • 1970-01-01
    • 2020-08-04
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多