WindowsClaimsIdentity.CreateFromUpn 方法 (String, String, Boolean, String)

Initializes an instance of T:Microsoft.IdentityModel.Claims.WindowsClaimsIdentity.

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

用法

    Dim upn As String
Dim authenticationType As String
Dim useWindowsTokenService As Boolean
Dim issuerName As String
Dim returnValue As WindowsClaimsIdentity

returnValue = WindowsClaimsIdentity.CreateFromUpn(upn, authenticationType, useWindowsTokenService, issuerName)

语法

声明
Public Shared Function CreateFromUpn ( _
    upn As String, _
    authenticationType As String, _
    useWindowsTokenService As Boolean, _
    issuerName As String _
) As WindowsClaimsIdentity
public static WindowsClaimsIdentity CreateFromUpn (
    string upn,
    string authenticationType,
    bool useWindowsTokenService,
    string issuerName
)
public:
static WindowsClaimsIdentity^ CreateFromUpn (
    String^ upn, 
    String^ authenticationType, 
    bool useWindowsTokenService, 
    String^ issuerName
)
public static WindowsClaimsIdentity CreateFromUpn (
    String upn, 
    String authenticationType, 
    boolean useWindowsTokenService, 
    String issuerName
)
public static function CreateFromUpn (
    upn : String, 
    authenticationType : String, 
    useWindowsTokenService : boolean, 
    issuerName : String
) : WindowsClaimsIdentity

参数

  • upn
    The Kerberos User Principal Name (UPN) of the user which this T:Microsoft.IdentityModel.Claims.WindowsClaimsIdentity represents.
  • authenticationType
    The type of authentication used.
  • useWindowsTokenService
    A boolean flag indicating whether the Windows Token Service is to be used for this operation.
  • issuerName
    A string indicating the issuer name for the claims.

异常

异常类型 条件

备注

If configured, the Windows Token Service will be utilized to ensure that this T:Microsoft.IdentityModel.Claims.WindowsClaimsIdentity allows impersonation.

线程安全

此类型的任何公共静态(在 Visual Basic 中为 Shared)成员都是线程安全的。但不能保证任何实例成员是线程安全的。

平台

开发平台

Windows Server 2003, Windows Vista

Target Platforms

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

请参见

参考

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