X509SecurityTokenHandler.ReadToken Method (XmlReader)

.NET Framework (current version)
 

Deserializes the X.509 security token referenced by the specified XML reader.

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

public override SecurityToken ReadToken(
	XmlReader reader
)

Parameters

reader
Type: System.Xml.XmlReader

An XML reader that is pointing to an X.509 security token.

Return Value

Type: System.IdentityModel.Tokens.SecurityToken

The security token deserialized from the XML. An instance of X509SecurityToken.

Exception Condition
ArgumentNullException

reader is null.

XmlException

reader is not pointing to a valid X.509 security token as defined in the WS-Security X.509 Token Profile. Or the encodingType specified is other than Base64 or HexBinary.

.NET Framework
Available since 4.5
Return to top
Show: