共用方式為


SamlSerializer.WriteToken 方法

定義

將指定的 SAML 安全性權杖寫入至指定的 XML 序列化程式。

public:
 virtual void WriteToken(System::IdentityModel::Tokens::SamlSecurityToken ^ token, System::Xml::XmlWriter ^ writer, System::IdentityModel::Selectors::SecurityTokenSerializer ^ keyInfoSerializer);
public virtual void WriteToken (System.IdentityModel.Tokens.SamlSecurityToken token, System.Xml.XmlWriter writer, System.IdentityModel.Selectors.SecurityTokenSerializer keyInfoSerializer);
abstract member WriteToken : System.IdentityModel.Tokens.SamlSecurityToken * System.Xml.XmlWriter * System.IdentityModel.Selectors.SecurityTokenSerializer -> unit
override this.WriteToken : System.IdentityModel.Tokens.SamlSecurityToken * System.Xml.XmlWriter * System.IdentityModel.Selectors.SecurityTokenSerializer -> unit
Public Overridable Sub WriteToken (token As SamlSecurityToken, writer As XmlWriter, keyInfoSerializer As SecurityTokenSerializer)

參數

token
SamlSecurityToken

要寫入的 SamlSecurityToken

writer
XmlWriter

要寫入 SAML 授權陳述式的 XmlDictionaryWriter

keyInfoSerializer
SecurityTokenSerializer

SecurityTokenSerializer,它可以寫入 KeyInfo 子句。

例外狀況

writernull

-或-

tokennull

備註

使用 WriteToken(SamlSecurityToken, XmlWriter, SecurityTokenSerializer) 方法,序列化 SamlSecurityToken 安全性權杖。 為了還原序列化 SamlSecurityToken,此時會使用 ReadToken(XmlReader, SecurityTokenSerializer, SecurityTokenResolver) 方法。

適用於