gpt4 book ai didi

c# - 是否有 ClaimTypes 属性来表示 "city"?

转载 作者:太空宇宙 更新时间:2023-11-03 19:16:26 25 4
gpt4 key购买 nike

我一直在查看各种 System.IdentityModel.Claims.ClaimTypes 属性 ( Class reference ),看看我的每个用户模型属性是否都有预定义类型。似乎除了城市之外还有。例如,我看到除了城市之外我需要的每个地址字段:

  • ClaimTypes.StreetAddress
  • ClaimTypes.StateOrProvince
  • ClaimTypes.PostalCode

我确实注意到有一个 ClaimTypes.Locality;这应该用来代表城市吗? (听起来这不是它的目的)。或者是否有其他一些 ClaimTypes 属性来表示我缺少的城市?

最佳答案

其实你的猜测是对的。根据Claim Catalog :

(l in RFC 2256) Locality component of a subject?s address information. According toRFC 2256: “This attributecontains the name of a locality, such as a city, county or othergeographic region.” e.g. Redmond.

RFC 2256说:

5.8. l

This attribute contains the name of a locality, such as a city,
county or other geographic region (localityName).

( 2.5.4.7 NAME 'l' SUP name )

您可以在 PDF 中找到来自 Microsoft 的更多官方详细信息格式,可在此处下载:Identity Selector Interoperability Profile specification and companion guides .

关于c# - 是否有 ClaimTypes 属性来表示 "city"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16341292/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com