public class JWTDecoder extends Object
| Constructor and Description |
|---|
JWTDecoder() |
| Modifier and Type | Method and Description |
|---|---|
JWT |
decode(String encodedJWT,
Map<String,Verifier> verifiers)
Decode the JWT using one of they provided verifiers.
|
JWT |
decode(String encodedJWT,
Map<String,Verifier> verifiers,
java.util.function.Function<Header,String> keyFunction)
Decode the JWT using one of they provided verifiers.
|
JWT |
decode(String encodedJWT,
Verifier... verifiers)
Decode the JWT using one of they provided verifiers.
|
static JWTDecoder |
getInstance() |
public static JWTDecoder getInstance()
public JWT decode(String encodedJWT, Verifier... verifiers)
A JWT that is expired or not yet valid will not be decoded, instead a JWTExpiredException or JWTUnavailableForProcessingException exception will be thrown respectively.
encodedJWT - The encoded JWT in string format.verifiers - A map of verifiers.public JWT decode(String encodedJWT, Map<String,Verifier> verifiers)
kid is expected to
contain the key to lookup the correct verifier.
A JWT that is expired or not yet valid will not be decoded, instead a JWTExpiredException or JWTUnavailableForProcessingException exception will be thrown respectively.
encodedJWT - The encoded JWT in string format.verifiers - A map of verifiers.public JWT decode(String encodedJWT, Map<String,Verifier> verifiers, java.util.function.Function<Header,String> keyFunction)
keyFunction. The key function is provided the JWT header and is expected to return a string key to
look up the correct verifier.
A JWT that is expired or not yet valid will not be decoded, instead a JWTExpiredException or JWTUnavailableForProcessingException exception will be thrown respectively.
encodedJWT - The encoded JWT in string format.verifiers - A map of verifiers.keyFunction - A function used to lookup the verifier key from the header.Copyright © 2017. All rights reserved.