X509SecurityTokenHandler Class

.NET Framework 4.5

Represents a security token handler that processes tokens of type X509SecurityToken. By default, the handler will perform chain-trust validation of the X.509 certificate.

System.Object
  System.IdentityModel.Tokens.SecurityTokenHandler
    System.IdentityModel.Tokens.X509SecurityTokenHandler

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

public class X509SecurityTokenHandler : SecurityTokenHandler

The X509SecurityTokenHandler type exposes the following members.

  NameDescription
Public methodX509SecurityTokenHandler()Initializes a new instance of the X509SecurityTokenHandler class with default values.
Public methodX509SecurityTokenHandler(Boolean)Initializes a new instance of the X509SecurityTokenHandler class by using a value that indicates whether the certificate should be mapped to a Windows account.
Public methodX509SecurityTokenHandler(X509CertificateValidator)Initializes a new instance of the X509SecurityTokenHandler class by using the specified certificate validator.
Public methodX509SecurityTokenHandler(Boolean, X509CertificateValidator)Initializes a new instance of the X509SecurityTokenHandler class by using a value that indicates whether the certificate should be mapped to a Windows account and the specified certificate validator.
Top

  NameDescription
Public propertyCanValidateTokenGets a value that indicates whether this handler supports validation of tokens of type X509SecurityToken. (Overrides SecurityTokenHandler.CanValidateToken.)
Public propertyCanWriteTokenGets a value that indicates whether this handler can write tokens of type X509SecurityToken. (Overrides SecurityTokenHandler.CanWriteToken.)
Public propertyCertificateValidatorGets or sets the X509CertificateValidator that is used by the current instance.
Public propertyConfigurationGets or sets the SecurityTokenHandlerConfiguration object that provides configuration for the current instance. (Inherited from SecurityTokenHandler.)
Public propertyContainingCollectionGets the token handler collection that contains the current instance. (Inherited from SecurityTokenHandler.)
Public propertyMapToWindowsGets or sets a value that indicates whether the validating token should be mapped to a Windows account.
Public propertyTokenTypeGets the Type of the tokens that this handler processes. (Overrides SecurityTokenHandler.TokenType.)
Public propertyWriteXmlDSigDefinedClauseTypesGets or Sets the value that specifies whether XmlDsig-defined clause types are preferred.
Public propertyX509NTAuthChainTrustValidatorGets or sets the X509NTAuthChainTrustValidator that is used by the current instance during certificate validation when the incoming X.509 certificate is mapped to a Windows account.
Top

  NameDescription
Public methodCanReadKeyIdentifierClauseReturns a value that indicates whether the specified reader is referring to an <ds:X509Data> element. (Overrides SecurityTokenHandler.CanReadKeyIdentifierClause(XmlReader).)
Public methodCanReadToken(String)Returns a value that indicates whether the specified string can be deserialized as a token of the type processed by this instance. (Inherited from SecurityTokenHandler.)
Public methodCanReadToken(XmlReader)Returns a value that indicates whether the reader points to an X.509 security token as defined in the WS-Security specification. (Overrides SecurityTokenHandler.CanReadToken(XmlReader).)
Public methodCanWriteKeyIdentifierClauseReturns a value that indicates whether the specified key identifier clause can be serialized by this handler. (Overrides SecurityTokenHandler.CanWriteKeyIdentifierClause(SecurityKeyIdentifierClause).)
Public methodCreateSecurityTokenReferenceWhen overridden in a derived class, creates the security token reference for tokens processed by that class. This method is typically called by a security token service (STS). (Inherited from SecurityTokenHandler.)
Public methodCreateTokenWhen overridden in a derived class, creates a security token using the specified token descriptor. This method is called by a security token service (STS). (Inherited from SecurityTokenHandler.)
Protected methodDetectReplayedTokenWhen overridden in a derived class, throws an exception if the specified token is detected as being replayed. (Inherited from SecurityTokenHandler.)
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTokenTypeIdentifiersGets the X.509 security token type defined in the WS-Security X.509 Token Profile. (Overrides SecurityTokenHandler.GetTokenTypeIdentifiers().)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodLoadCustomConfigurationLoads custom configuration from XML. (Overrides SecurityTokenHandler.LoadCustomConfiguration(XmlNodeList).)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodReadKeyIdentifierClauseDeserializes a key identifier clause referenced by the specified XML reader. (Overrides SecurityTokenHandler.ReadKeyIdentifierClause(XmlReader).)
Public methodReadToken(String)When overridden in a derived class, deserializes the specified string to a token of the type processed by the derived class. (Inherited from SecurityTokenHandler.)
Public methodReadToken(XmlReader)Deserializes the X.509 security token referenced by the specified XML reader. (Overrides SecurityTokenHandler.ReadToken(XmlReader).)
Public methodReadToken(XmlReader, SecurityTokenResolver)When overridden in a derived class, deserializes the XML referenced by the specified XML reader to a token of the type processed by the derived class by using the specified token resolver. (Inherited from SecurityTokenHandler.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Protected methodTraceTokenValidationFailureTraces the failure event during the validation of security tokens when tracing is enabled. (Inherited from SecurityTokenHandler.)
Protected methodTraceTokenValidationSuccessTraces the successful validation of security tokens event when tracing is enabled. (Inherited from SecurityTokenHandler.)
Public methodValidateTokenValidates the specified X.509 security token. (Overrides SecurityTokenHandler.ValidateToken(SecurityToken).)
Public methodWriteKeyIdentifierClauseSerializes the specified key identifier clause to the XML writer. (Overrides SecurityTokenHandler.WriteKeyIdentifierClause(XmlWriter, SecurityKeyIdentifierClause).)
Public methodWriteToken(SecurityToken)When overridden in a derived class, serializes the specified security token to a string. The token must be of the type processed by the derived class. (Inherited from SecurityTokenHandler.)
Public methodWriteToken(XmlWriter, SecurityToken)Serializes the specified X.509 security token to the specified XML writer. (Overrides SecurityTokenHandler.WriteToken(XmlWriter, SecurityToken).)
Top

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft