Compartilhar via


SamlSerializer.ReadToken Método

Definição

Lê um token de segurança do SAML do leitor XML especificado.

public:
 virtual System::IdentityModel::Tokens::SamlSecurityToken ^ ReadToken(System::Xml::XmlReader ^ reader, System::IdentityModel::Selectors::SecurityTokenSerializer ^ keyInfoSerializer, System::IdentityModel::Selectors::SecurityTokenResolver ^ outOfBandTokenResolver);
public virtual System.IdentityModel.Tokens.SamlSecurityToken ReadToken (System.Xml.XmlReader reader, System.IdentityModel.Selectors.SecurityTokenSerializer keyInfoSerializer, System.IdentityModel.Selectors.SecurityTokenResolver outOfBandTokenResolver);
abstract member ReadToken : System.Xml.XmlReader * System.IdentityModel.Selectors.SecurityTokenSerializer * System.IdentityModel.Selectors.SecurityTokenResolver -> System.IdentityModel.Tokens.SamlSecurityToken
override this.ReadToken : System.Xml.XmlReader * System.IdentityModel.Selectors.SecurityTokenSerializer * System.IdentityModel.Selectors.SecurityTokenResolver -> System.IdentityModel.Tokens.SamlSecurityToken
Public Overridable Function ReadToken (reader As XmlReader, keyInfoSerializer As SecurityTokenSerializer, outOfBandTokenResolver As SecurityTokenResolver) As SamlSecurityToken

Parâmetros

reader
XmlReader

Um XmlDictionaryReader para ler o token de segurança SamlSecurityToken.

keyInfoSerializer
SecurityTokenSerializer

Um SecurityTokenSerializer que lê a cláusula KeyInfo da assinatura digital.

outOfBandTokenResolver
SecurityTokenResolver

Um SecurityTokenResolver que determina o token de segurança que criou a assinatura digital.

Retornos

Um token de segurança SamlSecurityToken.

Exceções

reader é null

reader refere-se a um elemento XML que não tem uma assinatura digital.

Comentários

O ReadToken(XmlReader, SecurityTokenSerializer, SecurityTokenResolver) método chama o LoadAssertion(XmlDictionaryReader, SecurityTokenSerializer, SecurityTokenResolver) método para ler a declaração SAML.

Aplica-se a