[英]C# MongoDB not serializing System.Security.Claims.Claim
[英]C# Security Claims Value Outdated
當我使用System.Security.Claims;
ClaimTypes.Role
時System.Security.Claims;
缺少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
以指向正確的位置?
在Microsoft網站上查看https://msdn.microsoft.com/zh-cn/library/system.security.claims.claimtypes.role(v=vs.110).aspx他們還提供URI http://schemas.microsoft .com / ws / 2008/06 / identity / claims / role
不用擔心文本,最佳實踐是使用ClaimTypes.Role
。 字符串可以更改以反映日期,但是對象不會更改,因此您不必擔心代碼重構。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.