Edit

Share via


SamlSerializer.ReadToken Method

Definition

Reads a SAML security token from the specified XML reader.

public virtual System.IdentityModel.Tokens.SamlSecurityToken ReadToken(System.Xml.XmlReader reader, System.IdentityModel.Selectors.SecurityTokenSerializer keyInfoSerializer, System.IdentityModel.Selectors.SecurityTokenResolver outOfBandTokenResolver);

Parameters

reader
XmlReader

An XmlDictionaryReader to read the SamlSecurityToken security token.

keyInfoSerializer
SecurityTokenSerializer

A SecurityTokenSerializer that reads the KeyInfo clause of the digital signature.

outOfBandTokenResolver
SecurityTokenResolver

A SecurityTokenResolver that determines the security token that created the digital signature.

Returns

A SamlSecurityToken security token.

Exceptions

reader is null

reader refers to an XML element that does not contain a digital signature.

Remarks

The ReadToken(XmlReader, SecurityTokenSerializer, SecurityTokenResolver) method calls the LoadAssertion(XmlDictionaryReader, SecurityTokenSerializer, SecurityTokenResolver) method to read the SAML assertion.

Applies to

Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1