当SharePoint网站开启了Claims认证后,取回来的user的loginname是一个奇怪的字符串,这个到底是什么意思那?

这篇文章详细解释了:

https://blogs.msdn.microsoft.com/svarukala/2014/03/26/saml-claims-user-id-format/

拷贝如下:

SAML Claims User Id Format

 

I was working with a customer and shared this information about the format in which user identity claims (aka user id) appears in any Claims based site. I shared below information with the customer and it appeared they didn't know about this until then. Sharing this information here for the greater community.

SharePoint 2013 and SharePoint 2010 display identity claims with the following encoding format:

<IdentityClaim>:0<ClaimType><ClaimValueType><AuthMode>|<OriginalIssuer (optional)>|<ClaimValue>

Example: i:05.t|saml provider|spuserid@contoso.lab

Where:

  • <IdentityClaim> indicates the type of claim and is the
    following:
  • i” for an identity claim
  • c” for any other claim
    • <ClaimType> indicates the format for the claim value and
      is the following:
    • #” for a user logon name
    • .” for  an anonymous user
    • 5” for an email address
    • !” for an identity provider
    • +” for a Group security identifier (SID)
    • -“ for a role
    • %” for a farm ID
    • ?” for a name identifier
    • "\" for a private personal identifier (PPID)
      • <ClaimValueType> indicates the type of formatting for the
        claim value and is the following:
      • .” for a string
      • +” for an RFC 822-formatted name
        • <AuthMode> indicates the type of authentication used to
          obtain the identity claim and is the following:
        • w” for Windows claims (no original issuer)
        • s” for the local SharePoint security token service (STS)
          (no original issuer)
        • t” for a trusted issuer
        • m” for a membership issuer
        • r” for a role provider issuer
        • f” for forms-based authentication
        • c” for a claim provider
          • <OriginalIssuer> indicates the original issuer of the
            claim.
          • <ClaimValueType> indicates the value of the claim in the
            <ClaimType> format.

 

posted on   今夜太冷  阅读(265)  评论(0编辑  收藏  举报
编辑推荐:
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
阅读排行:
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 地球OL攻略 —— 某应届生求职总结
· 提示词工程——AI应用必不可少的技术
· Open-Sora 2.0 重磅开源!
· 周边上新:园子的第一款马克杯温暖上架
历史上的今天:
2012-04-18 Web Part的Scope问题
点击右上角即可分享
微信分享提示