ClaimsIdentity.Name 属性

定义

获取此声明标识的名称。Gets the name of this claims identity.

public:
 virtual property System::String ^ Name { System::String ^ get(); };
public virtual string Name { get; }
public virtual string? Name { get; }
member this.Name : string
Public Overridable ReadOnly Property Name As String

属性值

String

姓名或 nullThe name or null.

实现

注解

返回其类型与属性中设置的名称声明类型匹配的第一个声明的值 NameClaimTypeReturns the value of the first claim with a type that matches the name claim type set in the NameClaimType property. 如果未找到与名称声明类型匹配的声明,则返回 nullIf no claim is found that matches the name claim type, returns null.

适用于

另请参阅