Package | Description |
---|---|
io.jsonwebtoken |
Modifier and Type | Method and Description |
---|---|
JwtBuilder |
JwtBuilder.addClaims(Map<String,Object> claims)
Adds all given name/value pairs to the JSON Claims in the payload.
|
JwtBuilder |
JwtBuilder.base64UrlEncodeWith(Encoder<byte[],String> base64UrlEncoder)
Perform Base64Url encoding with the specified Encoder.
|
static JwtBuilder |
Jwts.builder()
Returns a new
JwtBuilder instance that can be configured and then used to create JWT compact serialized
strings. |
JwtBuilder |
JwtBuilder.claim(String name,
Object value)
Sets a custom JWT Claims parameter value.
|
JwtBuilder |
JwtBuilder.compressWith(CompressionCodec codec)
Compresses the JWT body using the specified
CompressionCodec . |
JwtBuilder |
JwtBuilder.serializeToJsonWith(Serializer<Map<String,?>> serializer)
Performs object-to-JSON serialization with the specified Serializer.
|
JwtBuilder |
JwtBuilder.setAudience(String aud)
Sets the JWT Claims
aud (audience) value. |
JwtBuilder |
JwtBuilder.setClaims(Claims claims)
Sets the JWT payload to be a JSON Claims instance.
|
JwtBuilder |
JwtBuilder.setClaims(Map<String,?> claims)
Sets the JWT payload to be a JSON Claims instance populated by the specified name/value pairs.
|
JwtBuilder |
JwtBuilder.setExpiration(Date exp)
Sets the JWT Claims
exp (expiration) value. |
JwtBuilder |
JwtBuilder.setHeader(Header header)
Sets (and replaces) any existing header with the specified header.
|
JwtBuilder |
JwtBuilder.setHeader(Map<String,Object> header)
Sets (and replaces) any existing header with the specified header.
|
JwtBuilder |
JwtBuilder.setHeaderParam(String name,
Object value)
Applies the specified name/value pair to the header.
|
JwtBuilder |
JwtBuilder.setHeaderParams(Map<String,Object> params)
Applies the specified name/value pairs to the header.
|
JwtBuilder |
JwtBuilder.setId(String jti)
Sets the JWT Claims
jti (JWT ID) value. |
JwtBuilder |
JwtBuilder.setIssuedAt(Date iat)
Sets the JWT Claims
iat (issued at) value. |
JwtBuilder |
JwtBuilder.setIssuer(String iss)
Sets the JWT Claims
iss (issuer) value. |
JwtBuilder |
JwtBuilder.setNotBefore(Date nbf)
Sets the JWT Claims
nbf (not before) value. |
JwtBuilder |
JwtBuilder.setPayload(String payload)
Sets the JWT's payload to be a plaintext (non-JSON) string.
|
JwtBuilder |
JwtBuilder.setSubject(String sub)
Sets the JWT Claims
sub (subject) value. |
JwtBuilder |
JwtBuilder.signWith(Key key)
Signs the constructed JWT with the specified key using the key's
recommended signature algorithm , producing a JWS. |
JwtBuilder |
JwtBuilder.signWith(Key key,
SignatureAlgorithm alg)
Signs the constructed JWT with the specified key using the specified algorithm, producing a JWS.
|
JwtBuilder |
JwtBuilder.signWith(SignatureAlgorithm alg,
byte[] secretKey)
Deprecated.
as of 0.10.0: use
Keys .hmacShaKeyFor(bytes) to
obtain the Key and then invoke signWith(Key) or signWith(Key, SignatureAlgorithm) .
This method will be removed in the 1.0 release. |
JwtBuilder |
JwtBuilder.signWith(SignatureAlgorithm alg,
Key key)
Deprecated.
since 0.10.0: use
signWith(Key, SignatureAlgorithm) instead. This method will be removed
in the 1.0 release. |
JwtBuilder |
JwtBuilder.signWith(SignatureAlgorithm alg,
String base64EncodedSecretKey)
Deprecated.
as of 0.10.0: use
signWith(Key) or signWith(Key, SignatureAlgorithm) instead. This
method will be removed in the 1.0 release. |
Copyright © 2014–2020 jsonwebtoken.io. All rights reserved.