Bewerken

Share via


UserNameSecurityTokenHandler.ReadToken(XmlReader) Method

Definition

Reads a UserNameSecurityToken from the specified reader.

public:
 override System::IdentityModel::Tokens::SecurityToken ^ ReadToken(System::Xml::XmlReader ^ reader);
public override System.IdentityModel.Tokens.SecurityToken ReadToken (System.Xml.XmlReader reader);
override this.ReadToken : System.Xml.XmlReader -> System.IdentityModel.Tokens.SecurityToken
Public Overrides Function ReadToken (reader As XmlReader) As SecurityToken

Parameters

reader
XmlReader

An XML reader positioned at the start element of the token.

Returns

The username security token that was deserialized from the XML.

Exceptions

reader is null.

The token cannot be read.

The password was not in plain text format.

An unknown element was found in the security token or the username was not specified.

Applies to