Saml2SecurityTokenHandler.ReadToken Method

Definition

Overloads

ReadToken(String)

Converts a string into an instance of Saml2SecurityToken.

ReadToken(XmlReader)

Reads a Saml2SecurityToken where the XmlReader is positioned the beginning of a Saml2 assertion.

ReadToken(XmlReader, TokenValidationParameters)

Reads and validates a SAML 2.0 token using the XmlReader.

ReadToken(String)

Converts a string into an instance of Saml2SecurityToken.

public override Microsoft.IdentityModel.Tokens.SecurityToken ReadToken (string token);
override this.ReadToken : string -> Microsoft.IdentityModel.Tokens.SecurityToken
Public Overrides Function ReadToken (token As String) As SecurityToken

Parameters

token
String

a Saml2 token as a string.

Returns

A Saml2SecurityToken

Exceptions

If token is null or empty.

If token.Length is greater than MaximumTokenSizeInBytes.

Applies to

ReadToken(XmlReader)

Reads a Saml2SecurityToken where the XmlReader is positioned the beginning of a Saml2 assertion.

public override Microsoft.IdentityModel.Tokens.SecurityToken ReadToken (System.Xml.XmlReader reader);
override this.ReadToken : System.Xml.XmlReader -> Microsoft.IdentityModel.Tokens.SecurityToken
Public Overrides Function ReadToken (reader As XmlReader) As SecurityToken

Parameters

reader
XmlReader

A XmlReader reader positioned at a saml2 assertion element.

Returns

A Saml2SecurityToken.

Exceptions

If reader is null.

Applies to

ReadToken(XmlReader, TokenValidationParameters)

Reads and validates a SAML 2.0 token using the XmlReader.

public override Microsoft.IdentityModel.Tokens.SecurityToken ReadToken (System.Xml.XmlReader reader, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters);
override this.ReadToken : System.Xml.XmlReader * Microsoft.IdentityModel.Tokens.TokenValidationParameters -> Microsoft.IdentityModel.Tokens.SecurityToken
Public Overrides Function ReadToken (reader As XmlReader, validationParameters As TokenValidationParameters) As SecurityToken

Parameters

reader
XmlReader

A XmlReader reader positioned at a Saml2Assertion element.

validationParameters
TokenValidationParameters

The TokenValidationParameters to be used for validating the token.

Returns

An instance of Saml2SecurityToken.

Exceptions

Currently not supported.

Applies to