SecurityTokenElement.ValidateToken Method

Definition

Creates the identities that are contained in the specified XML representation of a security token.

protected:
 virtual System::Collections::ObjectModel::ReadOnlyCollection<System::Security::Claims::ClaimsIdentity ^> ^ ValidateToken(System::Xml::XmlElement ^ securityTokenXml, System::IdentityModel::Tokens::SecurityTokenHandlerCollection ^ securityTokenHandlers);
protected virtual System.Collections.ObjectModel.ReadOnlyCollection<System.Security.Claims.ClaimsIdentity> ValidateToken (System.Xml.XmlElement securityTokenXml, System.IdentityModel.Tokens.SecurityTokenHandlerCollection securityTokenHandlers);
abstract member ValidateToken : System.Xml.XmlElement * System.IdentityModel.Tokens.SecurityTokenHandlerCollection -> System.Collections.ObjectModel.ReadOnlyCollection<System.Security.Claims.ClaimsIdentity>
override this.ValidateToken : System.Xml.XmlElement * System.IdentityModel.Tokens.SecurityTokenHandlerCollection -> System.Collections.ObjectModel.ReadOnlyCollection<System.Security.Claims.ClaimsIdentity>
Protected Overridable Function ValidateToken (securityTokenXml As XmlElement, securityTokenHandlers As SecurityTokenHandlerCollection) As ReadOnlyCollection(Of ClaimsIdentity)

Parameters

securityTokenXml
XmlElement

The XML representation of the security token.

securityTokenHandlers
SecurityTokenHandlerCollection

The token handler collection to use to read the token.

Returns

The identities that are contained in the token.

Exceptions

securityTokenXml is null.

-or-

securityTokenHandlers is null.

Applies to