JwtSecurityTokenHandler.ValidateSignature Method (JwtSecurityToken)

Validates the signature of a JwtSecurityToken

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

Syntax

'Declaration
Protected Overridable Sub ValidateSignature ( _
    jwt As JwtSecurityToken _
)
protected virtual void ValidateSignature(
    JwtSecurityToken jwt
)
protected:
virtual void ValidateSignature(
    JwtSecurityToken^ jwt
)
abstract ValidateSignature : 
        jwt:JwtSecurityToken -> unit  
override ValidateSignature : 
        jwt:JwtSecurityToken -> unit
protected function ValidateSignature(
    jwt : JwtSecurityToken
)

Parameters

Exceptions

Exception Condition
ArgumentNullException

'jwt' is null.

InvalidOperationException

JwtSecurityTokenHandler.Configuration is null.

-or-JwtSecurityTokenHandler.Configuration.IssuerTokenResolver is null.

SecurityTokenValidationException

ResolveToken returns null.

-or-

signature is not valid.

Remarks

If validation is successful, SigningToken and SigningKey will be set to the SecurityToken and SecurityKey the validated the signature.

.NET Framework Security

See Also

Reference

JwtSecurityTokenHandler Class

ValidateSignature Overload

System.IdentityModel.Tokens Namespace