public final class Jwts
extends java.lang.Object
| 限定符和类型 | 方法和说明 |
|---|---|
static JwtBuilder |
builder()
Returns a new
JwtBuilder instance that can be configured and then used to create JWT compact serialized
strings. |
static Claims |
claims()
Returns a new
Claims instance to be used as a JWT body. |
static Claims |
claims(java.util.Map<java.lang.String,java.lang.Object> claims)
Returns a new
Claims instance populated with the specified name/value pairs. |
static Header |
header()
Creates a new
Header instance suitable for plaintext (not digitally signed) JWTs. |
static Header |
header(java.util.Map<java.lang.String,java.lang.Object> header)
Creates a new
Header instance suitable for plaintext (not digitally signed) JWTs, populated
with the specified name/value pairs. |
static JwsHeader |
jwsHeader()
Returns a new
JwsHeader instance suitable for digitally signed JWTs (aka 'JWS's). |
static JwsHeader |
jwsHeader(java.util.Map<java.lang.String,java.lang.Object> header)
Returns a new
JwsHeader instance suitable for digitally signed JWTs (aka 'JWS's), populated with the
specified name/value pairs. |
static JwtParser |
parser()
Returns a new
JwtParser instance that can be configured and then used to parse JWT strings. |
public static Header header()
Header instance suitable for plaintext (not digitally signed) JWTs. As this
is a less common use of JWTs, consider using the jwsHeader() factory method instead if you will later
digitally sign the JWT.Header instance suitable for plaintext (not digitally signed) JWTs.public static Header header(java.util.Map<java.lang.String,java.lang.Object> header)
Header instance suitable for plaintext (not digitally signed) JWTs, populated
with the specified name/value pairs. As this is a less common use of JWTs, consider using the
jwsHeader(java.util.Map) factory method instead if you will later digitally sign the JWT.Header instance suitable for plaintext (not digitally signed) JWTs.public static JwsHeader jwsHeader()
JwsHeader instance suitable for digitally signed JWTs (aka 'JWS's).JwsHeader instance suitable for digitally signed JWTs (aka 'JWS's).JwtBuilder.setHeader(Header)public static JwsHeader jwsHeader(java.util.Map<java.lang.String,java.lang.Object> header)
JwsHeader instance suitable for digitally signed JWTs (aka 'JWS's), populated with the
specified name/value pairs.JwsHeader instance suitable for digitally signed JWTs (aka 'JWS's), populated with the
specified name/value pairs.JwtBuilder.setHeader(Header)public static Claims claims()
Claims instance to be used as a JWT body.Claims instance to be used as a JWT body.public static Claims claims(java.util.Map<java.lang.String,java.lang.Object> claims)
Claims instance populated with the specified name/value pairs.claims - the name/value pairs to populate the new Claims instance.Claims instance populated with the specified name/value pairs.public static JwtParser parser()
JwtParser instance that can be configured and then used to parse JWT strings.JwtParser instance that can be configured and then used to parse JWT strings.public static JwtBuilder builder()
JwtBuilder instance that can be configured and then used to create JWT compact serialized
strings.JwtBuilder instance that can be configured and then used to create JWT compact serialized
strings.