SamlSerializer.ReadToken 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
從指定的 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 安全性權杖。
例外狀況
reader
是 null
reader
會參考不包含數位簽章的 XML 項目。
備註
ReadToken(XmlReader, SecurityTokenSerializer, SecurityTokenResolver) 方法會呼叫 LoadAssertion(XmlDictionaryReader, SecurityTokenSerializer, SecurityTokenResolver) 方法來讀取 SAML 判斷提示。