AppServiceTokenHandler.ValidateToken(String, String, String, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Validates the specified JWT token string against the specified secret key. Exceptions thrown by the validation method are not caught.
public static void ValidateToken (string token, string secretKey, string audience, string issuer);
static member ValidateToken : string * string * string * string -> unit
Public Shared Sub ValidateToken (token As String, secretKey As String, audience As String, issuer As String)
Parameters
- token
- String
The JWT token string to validate.
- secretKey
- String
The key to use in the validation.
- audience
- String
The audience to use in validation.
- issuer
- String
The issuer to use in validation.
Exceptions
Thrown if the JWT token is malformed.
Thrown if one of the method parameters are null or empty.
Thrown if the JWT token fails validation.
Thrown if the JWT token is expired.
Thrown if the JWT token is not yet valid.
Applies to
Azure SDK for .NET