public abstract class JWT extends java.lang.Object implements DecodedJWT
| Constructor and Description |
|---|
JWT() |
| Modifier and Type | Method and Description |
|---|---|
static JWTCreator.Builder |
create()
Returns a JWT builder used to create and sign jwt tokens
|
static JWT |
decode(java.lang.String token)
Decode a given JWT token.
|
static JWTVerifier.Verification |
require(Algorithm algorithm)
Returns a
JWTVerifier builder with the algorithm to be used to validate token signature. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetTokengetAudience, getClaim, getExpiresAt, getId, getIssuedAt, getIssuer, getNotBefore, getSubjectgetAlgorithm, getContentType, getHeaderClaim, getKeyId, getTypegetSignaturepublic static JWT decode(java.lang.String token) throws JWTDecodeException
token - with jwt format as string.JWTDecodeException - if any part of the token contained an invalid jwt or JSON format of each of the jwt parts.public static JWTVerifier.Verification require(Algorithm algorithm)
JWTVerifier builder with the algorithm to be used to validate token signature.algorithm - that will be used to verify the token's signature.JWTVerifier builderjava.lang.IllegalArgumentException - if the provided algorithm is null.public static JWTCreator.Builder create()