共用方式為


Saml2SecurityTokenHandler.WriteToken Method

Definition

Overloads

WriteToken(SecurityToken)

Serializes a Saml2SecurityToken to a string.

WriteToken(XmlWriter, SecurityToken)

Writes a Saml2SecurityToken using the XmlWriter.

WriteToken(SecurityToken)

Serializes a Saml2SecurityToken to a string.

public override string WriteToken (Microsoft.IdentityModel.Tokens.SecurityToken securityToken);
override this.WriteToken : Microsoft.IdentityModel.Tokens.SecurityToken -> string
Public Overrides Function WriteToken (securityToken As SecurityToken) As String

Parameters

Returns

Exceptions

If the securityToken is null.

If securityToken is not a Saml2SecurityToken.

Applies to

WriteToken(XmlWriter, SecurityToken)

Writes a Saml2SecurityToken using the XmlWriter.

public override void WriteToken (System.Xml.XmlWriter writer, Microsoft.IdentityModel.Tokens.SecurityToken securityToken);
override this.WriteToken : System.Xml.XmlWriter * Microsoft.IdentityModel.Tokens.SecurityToken -> unit
Public Overrides Sub WriteToken (writer As XmlWriter, securityToken As SecurityToken)

Parameters

writer
XmlWriter

A XmlWriter to serialize the SecurityToken.

securityToken
SecurityToken

The SecurityToken to serialize.

Exceptions

Applies to