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

一个 XmlDictionaryWriter,它写入 SAML 授权语句。

keyInfoSerializer
SecurityTokenSerializer

一个 SecurityTokenSerializer,它能够写入 KeyInfo 子句。

例外

writernull

- 或 -

tokennull

注解

使用 WriteToken(SamlSecurityToken, XmlWriter, SecurityTokenSerializer) 方法可序列化 SamlSecurityToken 安全令牌。 若要反序列化 SamlSecurityToken,请使用 ReadToken(XmlReader, SecurityTokenSerializer, SecurityTokenResolver) 方法。

适用于