SecurityTokenElement.ValidateToken Method (XmlElement, SecurityTokenHandlerCollection)

.NET Framework (current version)
 

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

Namespace:   System.IdentityModel.Tokens
Assembly:  System.IdentityModel (in System.IdentityModel.dll)

protected virtual ReadOnlyCollection<ClaimsIdentity> ValidateToken(
	XmlElement securityTokenXml,
	SecurityTokenHandlerCollection securityTokenHandlers
)

Parameters

securityTokenXml
Type: System.Xml.XmlElement

The XML representation of the security token.

securityTokenHandlers
Type: System.IdentityModel.Tokens.SecurityTokenHandlerCollection

The token handler collection to use to read the token.

Return Value

Type: System.Collections.ObjectModel.ReadOnlyCollection<ClaimsIdentity>

The identities that are contained in the token.

Exception Condition
InvalidOperationException

securityTokenXml is null.

-or-

securityTokenHandlers is null.

.NET Framework
Available since 4.5
Return to top
Show: