共用方式為


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 判斷提示。

適用於