Microsoft.IdentityModel.Tokens.SecurityTokenHandler
Defines the interface for a Security Token Handler.
Gets a value indicating whether this handler supports validation of tokens
handled by this instance.
Gets a value indicating whether the class provides serialization functionality to serialize token handled
by this instance.
This must be overridden to get the System.Type of the SecurityToken this instance handles.
protected SecurityTokenHandler()
Creates an instance of SecurityTokenHandler
Indicates whether the XmlReader is positioned at an element that can be read.
Indicates whether the current token string can be read as a token
of the type handled by this instance.
public virtual SecurityKeyIdentifierClause CreateSecurityTokenReference(SecurityToken token, bool attached)
Returns SecurityKeyIdentifierClause.
Returns SecurityToken.
Gets security token.
public abstract SecurityToken ReadToken(XmlReader reader, TokenValidationParameters validationParameters)
This must be overridden to deserialize token with the provided TokenValidationParameters.
public virtual ClaimsPrincipal ValidateToken(string securityToken, TokenValidationParameters validationParameters, out SecurityToken validatedToken)
This must be overridden to validate a token passed as a string using TokenValidationParameters
public virtual ClaimsPrincipal ValidateToken(XmlReader reader, TokenValidationParameters validationParameters, out SecurityToken validatedToken)
Reads and validates a token using a xmlReader and TokenValidationParameters
Serializes to string a token of the type handled by this instance.
This must be overridden to serialize to XML a token of the type handled by this instance.