Freigeben über


SamlSecurityTokenHandler.ReadToken Method

Definition

Overloads

ReadToken(String)

Converts a string into an instance of SamlSecurityToken.

ReadToken(XmlReader)

Reads a SamlSecurityToken where the XmlReader is positioned the beginning of a Saml assertion.

ReadToken(XmlReader, TokenValidationParameters)

Deserializes from XML a token of the type handled by this instance.

ReadToken(String)

Converts a string into an instance of SamlSecurityToken.

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 Saml token as a string.

Returns

A SamlSecurityToken

Exceptions

If token is null or empty.

If 'token.Length' is greater than MaximumTokenSizeInBytes.

Applies to

ReadToken(XmlReader)

Reads a SamlSecurityToken where the XmlReader is positioned the beginning of a Saml 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 positioned at a 'saml:assertion' element.

Returns

An instance of SamlSecurityToken.

Exceptions

if reader is null.

Applies to

ReadToken(XmlReader, TokenValidationParameters)

Deserializes from XML a token of the type handled by this instance.

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

An XML reader positioned at the token's start element.

validationParameters
TokenValidationParameters

The TokenValidationParameters to be used for validating the token.

Returns

An instance of SamlSecurityToken.

Applies to