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 returnValue As WindowsClaimsIdentity

returnValue = WindowsClaimsIdentity.CreateFromCertificate(certificate, useWindowsTokenService)

Syntax

Visual Basic
Public Shared Function CreateFromCertificate ( _
		certificate As X509Certificate2, _
		useWindowsTokenService As Boolean _
) As WindowsClaimsIdentity
C#
public static WindowsClaimsIdentity CreateFromCertificate (
		X509Certificate2 certificate,
		bool useWindowsTokenService
)
C++
public:
static WindowsClaimsIdentity^ CreateFromCertificate (
		X509Certificate2^ certificate, 
		bool useWindowsTokenService
)
J#
public static WindowsClaimsIdentity CreateFromCertificate (
		X509Certificate2 certificate, 
		boolean useWindowsTokenService
)
JScript
public static function CreateFromCertificate (
		certificate : X509Certificate2, 
		useWindowsTokenService : boolean
) : 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.

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