SecurityTokenSerializer.ReadToken(XmlReader, SecurityTokenResolver) 方法

定义

读取由指定的 XML 读取器指向的安全令牌。

public:
 System::IdentityModel::Tokens::SecurityToken ^ ReadToken(System::Xml::XmlReader ^ reader, System::IdentityModel::Selectors::SecurityTokenResolver ^ tokenResolver);
public System.IdentityModel.Tokens.SecurityToken ReadToken (System.Xml.XmlReader reader, System.IdentityModel.Selectors.SecurityTokenResolver tokenResolver);
member this.ReadToken : System.Xml.XmlReader * System.IdentityModel.Selectors.SecurityTokenResolver -> System.IdentityModel.Tokens.SecurityToken
Public Function ReadToken (reader As XmlReader, tokenResolver As SecurityTokenResolver) As SecurityToken

参数

reader
XmlReader

读取安全令牌的 XmlReader

tokenResolver
SecurityTokenResolver

确定安全令牌类型的 SecurityTokenResolver

返回

表示所读取的安全令牌的 SecurityToken

例外

readernull

tokenResolvernull

注解

SecurityTokenSerializer 类派生的类必须重写 ReadTokenCore(XmlReader, SecurityTokenResolver) 方法。 ReadToken(XmlReader, SecurityTokenResolver) 方法调用 ReadTokenCore(XmlReader, SecurityTokenResolver) 方法。

适用于