Package | Description |
---|---|
io.jsonwebtoken |
Modifier and Type | Method and Description |
---|---|
JwtBuilder |
JwtBuilder.addClaims(java.util.Map<java.lang.String,java.lang.Object> claims)
Adds all given name/value pairs to the JSON Claims in the payload.
|
JwtBuilder |
JwtBuilder.base64UrlEncodeWith(Encoder<byte[],java.lang.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(java.lang.String name,
java.lang.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<java.util.Map<java.lang.String,?>> serializer)
Performs object-to-JSON serialization with the specified Serializer.
|
JwtBuilder |
JwtBuilder.setAudience(java.lang.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(java.util.Map<java.lang.String,?> claims)
Sets the JWT payload to be a JSON Claims instance populated by the specified name/value pairs.
|
JwtBuilder |
JwtBuilder.setExpiration(java.util.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(java.util.Map<java.lang.String,java.lang.Object> header)
Sets (and replaces) any existing header with the specified header.
|
JwtBuilder |
JwtBuilder.setHeaderParam(java.lang.String name,
java.lang.Object value)
Applies the specified name/value pair to the header.
|
JwtBuilder |
JwtBuilder.setHeaderParams(java.util.Map<java.lang.String,java.lang.Object> params)
Applies the specified name/value pairs to the header.
|
JwtBuilder |
JwtBuilder.setId(java.lang.String jti)
Sets the JWT Claims
jti (JWT ID) value. |
JwtBuilder |
JwtBuilder.setIssuedAt(java.util.Date iat)
Sets the JWT Claims
iat (issued at) value. |
JwtBuilder |
JwtBuilder.setIssuer(java.lang.String iss)
Sets the JWT Claims
iss (issuer) value. |
JwtBuilder |
JwtBuilder.setNotBefore(java.util.Date nbf)
Sets the JWT Claims
nbf (not before) value. |
JwtBuilder |
JwtBuilder.setPayload(java.lang.String payload)
Sets the JWT's payload to be a plaintext (non-JSON) string.
|
JwtBuilder |
JwtBuilder.setSubject(java.lang.String sub)
Sets the JWT Claims
sub (subject) value. |
JwtBuilder |
JwtBuilder.signWith(java.security.Key key)
Signs the constructed JWT with the specified key using the key's
recommended signature algorithm , producing a JWS. |
JwtBuilder |
JwtBuilder.signWith(java.security.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,
java.security.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,
java.lang.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-2022 jsonwebtoken.io. All Rights Reserved.