Initializes an instance of T:Microsoft.IdentityModel.Claims.WindowsClaimsIdentity.
Namespace: Microsoft.IdentityModel.Claims
Assembly: Microsoft.IdentityModel (in microsoft.identitymodel.dll)

Usage

Visual Basic
Dim certificate As X509Certificate2
Dim useWindowsTokenService As Boolean
Dim issuerName As String
Dim returnValue As WindowsClaimsIdentity

returnValue = WindowsClaimsIdentity.CreateFromCertificate(certificate, useWindowsTokenService, issuerName)

Syntax

Visual Basic
Public Shared Function CreateFromCertificate ( _
		certificate As X509Certificate2, _
		useWindowsTokenService As Boolean, _
		issuerName As String _
) As WindowsClaimsIdentity
C#
public static WindowsClaimsIdentity CreateFromCertificate (
		X509Certificate2 certificate,
		bool useWindowsTokenService,
		string issuerName
)
C++
public:
static WindowsClaimsIdentity^ CreateFromCertificate (
		X509Certificate2^ certificate, 
		bool useWindowsTokenService, 
		String^ issuerName
)
J#
public static WindowsClaimsIdentity CreateFromCertificate (
		X509Certificate2 certificate, 
		boolean useWindowsTokenService, 
		String issuerName
)
JScript
public static function CreateFromCertificate (
		certificate : X509Certificate2, 
		useWindowsTokenService : boolean, 
		issuerName : String
) : WindowsClaimsIdentity

Parameters

certificate

The certificate to draw the Upn claim from to use to map to the associated T:Microsoft.IdentityModel.Claims.WindowsClaimsIdentity

useWindowsTokenService

If true this method will an S4U logon will executed in the context of the trusted token service.

issuerName

The name of the issuer to use for the claims.

Return Value

A T:Microsoft.IdentityModel.Claims.WindowsClaimsIdentity representing the user associated with the UPN in the certificate.

Exceptions

Exception type Condition

Remarks

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


Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows Server 2003, Windows Vista

Target Platforms

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

See Also