Claim.CreateUpnClaim(String) 方法

定义

创建一个表示指定通用主要名称 (UPN) 的 Claim 对象。Creates a Claim object that represents the specified Universal Principal Name (UPN).

public:
 static System::IdentityModel::Claims::Claim ^ CreateUpnClaim(System::String ^ upn);
public static System.IdentityModel.Claims.Claim CreateUpnClaim (string upn);
static member CreateUpnClaim : string -> System.IdentityModel.Claims.Claim
Public Shared Function CreateUpnClaim (upn As String) As Claim

参数

upn
String

与此声明关联的实体的 UPN。The UPN of the entity associated with this claim. 此参数不能为 nullThis parameter must not be null. 如果此参数为 null,此方法将引发 ArgumentNullException 异常。If this parameter is null, this method throws an ArgumentNullException exception.

返回

Claim

此方法创建的 Claim 对象。The Claim object this method creates.

例外

upn 参数为 nullThe upn parameter is null.

注解

此方法创建的 Claim 对象具有下表所示的属性值。The Claim object this method creates has the property values shown in the following table.

属性Property “值”Value
ClaimType Upn
Resource upn 参数的值。The value of the upn parameter.
Right PossessProperty.PossessProperty.

适用于