This documentation is archived and is not being maintained.

X509SecurityTokenAuthenticator Constructor (X509CertificateValidator, Boolean)

Initializes a new instance of the X509SecurityTokenAuthenticator class using the specified certificate validation method and indicates whether the identity of the certificate is mapped to a Windows identity.

Namespace:  System.IdentityModel.Selectors
Assembly:  System.IdentityModel (in System.IdentityModel.dll)

public:
X509SecurityTokenAuthenticator(
	X509CertificateValidator^ validator, 
	bool mapToWindows
)

Parameters

validator
Type: System.IdentityModel.Selectors::X509CertificateValidator
A X509CertificateValidator that verifies that the certificate is valid.
mapToWindows
Type: System::Boolean
true to map the identity of the certificate to a Windows identity; otherwise, false.

The X509CertificateValidator class provides a set of pre-defined certificate validation models, such as the ChainTrust property. These validation models can be passed to the validator parameter. When an application requires a custom validation method, derive a class from X509CertificateValidator and override the Validate(X509Certificate2) method. The Validate(X509Certificate2) method is called by the ValidateTokenCore method.

When the ValidateTokenCore method is called to authenticate the token and mapToWindows is true, the X.509 certificate is mapped to a Windows account and claims are added to the EvaluationContext with the Windows groups that the user belongs to. How the X.509 certificate is mapped to a Windows account depends upon the security token type:

  • When the security token is of type X509WindowsSecurityToken, the X.509 certificate is mapped using the WindowsIdentity property.

  • When the security token is of type X509SecurityToken, the X.509 certificate is mapped to a Windows account using its user principal name (UPN).

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: