SamlSerializer.ReadToken 方法

定义

从指定的 XML 读取器读取 SAML 安全令牌。

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

参数

reader
XmlReader

一个 XmlDictionaryReader,它读取 SamlSecurityToken 安全令牌。

keyInfoSerializer
SecurityTokenSerializer

一个 SecurityTokenSerializer,它读取数字签名的 KeyInfo 子句。

outOfBandTokenResolver
SecurityTokenResolver

一个 SecurityTokenResolver,它确定是哪个安全令牌创建了数字签名。

返回

一个 SamlSecurityToken 安全令牌。

例外

readernull

reader 引用不包含数字签名的 XML 元素。

注解

ReadToken(XmlReader, SecurityTokenSerializer, SecurityTokenResolver) 方法调用 LoadAssertion(XmlDictionaryReader, SecurityTokenSerializer, SecurityTokenResolver) 方法来读取 SAML 断言。

适用于