ClaimsIdentity 构造函数 (String, String, String)

Initializes an instance of T:Microsoft.IdentityModel.Claims.ClaimsIdentity with an empty T:Microsoft.IdentityModel.Claims.Claim collection, the specified authentication type, name claim type, and role claim type.

命名空间: Microsoft.IdentityModel.Claims
程序集: Microsoft.IdentityModel(microsoft.identitymodel.dll 中)

用法

    Dim authenticationType As String
Dim nameClaimType As String
Dim roleClaimType As String

Dim instance As New ClaimsIdentity(authenticationType, nameClaimType, roleClaimType)

语法

声明
Public Sub New ( _
    authenticationType As String, _
    nameClaimType As String, _
    roleClaimType As String _
)
public ClaimsIdentity (
    string authenticationType,
    string nameClaimType,
    string roleClaimType
)
public:
ClaimsIdentity (
    String^ authenticationType, 
    String^ nameClaimType, 
    String^ roleClaimType
)
public ClaimsIdentity (
    String authenticationType, 
    String nameClaimType, 
    String roleClaimType
)
public function ClaimsIdentity (
    authenticationType : String, 
    nameClaimType : String, 
    roleClaimType : String
)

参数

  • authenticationType
    The type of authentication used.
  • nameClaimType
    The claim type to use for P:Microsoft.IdentityModel.Claims.ClaimsIdentity.Name.
  • roleClaimType
    The claim type to use for IClaimsPrincipal.IsInRole(string).

异常

异常类型 条件

备注

平台

开发平台

Windows Server 2003, Windows Vista

Target Platforms

Windows Server 2008, Windows Vista, Not tested on Windows XP

请参见

参考

ClaimsIdentity 类
ClaimsIdentity 成员
Microsoft.IdentityModel.Claims 命名空间