| Package | Description |
|---|---|
| io.jsonwebtoken |
| Modifier and Type | Method | Description |
|---|---|---|
static Claims |
Jwts.claims() |
Returns a new
Claims instance to be used as a JWT body. |
static Claims |
Jwts.claims(Map<String,Object> claims) |
Returns a new
Claims instance populated with the specified name/value pairs. |
Claims |
ClaimJwtException.getClaims() |
|
Claims |
Claims.setAudience(String aud) |
Sets the JWT
aud (audience) value. |
Claims |
Claims.setExpiration(Date exp) |
Sets the JWT
exp (expiration) timestamp. |
Claims |
Claims.setId(String jti) |
Sets the JWT
jti (JWT ID) value. |
Claims |
Claims.setIssuedAt(Date iat) |
Sets the JWT
iat (issued at) timestamp. |
Claims |
Claims.setIssuer(String iss) |
Sets the JWT
iss (issuer) value. |
Claims |
Claims.setNotBefore(Date nbf) |
Sets the JWT
nbf (not before) timestamp. |
Claims |
Claims.setSubject(String sub) |
Sets the JWT
sub (subject) value. |
| Modifier and Type | Method | Description |
|---|---|---|
Jws<Claims> |
JwtParser.parseClaimsJws(String claimsJws) |
Parses the specified compact serialized JWS string based on the builder's current configuration state and
returns
the resulting Claims JWS instance.
|
Jwt<Header,Claims> |
JwtParser.parseClaimsJwt(String claimsJwt) |
Parses the specified compact serialized JWT string based on the builder's current configuration state and
returns
the resulting unsigned plaintext JWT instance.
|
| Modifier and Type | Method | Description |
|---|---|---|
Key |
SigningKeyResolver.resolveSigningKey(JwsHeader header,
Claims claims) |
Returns the signing key that should be used to validate a digital signature for the Claims JWS with the specified
header and claims.
|
Key |
SigningKeyResolverAdapter.resolveSigningKey(JwsHeader header,
Claims claims) |
|
byte[] |
SigningKeyResolverAdapter.resolveSigningKeyBytes(JwsHeader header,
Claims claims) |
Convenience method invoked by
SigningKeyResolverAdapter.resolveSigningKey(JwsHeader, Claims) that obtains the necessary signing
key bytes. |
JwtBuilder |
JwtBuilder.setClaims(Claims claims) |
Sets the JWT payload to be a JSON Claims instance.
|
| Modifier and Type | Method | Description |
|---|---|---|
T |
JwtHandler.onClaimsJws(Jws<Claims> jws) |
This method is invoked when a
JwtParser determines that the parsed JWT is
a valid Claims JWS. |
T |
JwtHandlerAdapter.onClaimsJws(Jws<Claims> jws) |
|
T |
JwtHandler.onClaimsJwt(Jwt<Header,Claims> jwt) |
This method is invoked when a
JwtParser determines that the parsed JWT is
a Claims JWT. |
T |
JwtHandlerAdapter.onClaimsJwt(Jwt<Header,Claims> jwt) |
Copyright © 2019. All rights reserved.