SecurityTokenHandlerCollection.WriteToken Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Serializes the specified security token.
Overloads
WriteToken(SecurityToken) |
Serializes the specified security token to a string. |
WriteToken(XmlWriter, SecurityToken) |
Serializes the specified security token to XML. |
WriteToken(SecurityToken)
Serializes the specified security token to a string.
public:
System::String ^ WriteToken(System::IdentityModel::Tokens::SecurityToken ^ token);
public string WriteToken (System.IdentityModel.Tokens.SecurityToken token);
member this.WriteToken : System.IdentityModel.Tokens.SecurityToken -> string
Public Function WriteToken (token As SecurityToken) As String
Parameters
- token
- SecurityToken
The token to serialize.
Returns
The string serialized from the token.
Exceptions
token
is null
.
The collection does not contain a handler capable of serializing the specified token.
Applies to
WriteToken(XmlWriter, SecurityToken)
Serializes the specified security token to XML.
public:
void WriteToken(System::Xml::XmlWriter ^ writer, System::IdentityModel::Tokens::SecurityToken ^ token);
public void WriteToken (System.Xml.XmlWriter writer, System.IdentityModel.Tokens.SecurityToken token);
member this.WriteToken : System.Xml.XmlWriter * System.IdentityModel.Tokens.SecurityToken -> unit
Public Sub WriteToken (writer As XmlWriter, token As SecurityToken)
Parameters
- writer
- XmlWriter
The XML writer.
- token
- SecurityToken
The token to serialize.
Exceptions
The collection does not contain a handler capable of serializing the specified token.