Modifier and Type | Method and Description |
---|---|
Jwt.Builder |
audience(java.util.Collection<java.lang.String> audience)
Use this audience in the resulting
Jwt |
Jwt |
build()
Build the
Jwt |
Jwt.Builder |
claim(java.lang.String name,
java.lang.Object value)
Use this claim in the resulting
Jwt |
Jwt.Builder |
claims(java.util.function.Consumer<java.util.Map<java.lang.String,java.lang.Object>> claimsConsumer)
Provides access to every
claim(String, Object)
declared so far with the possibility to add, replace, or remove. |
Jwt.Builder |
expiresAt(java.time.Instant expiresAt)
Use this expiration in the resulting
Jwt |
Jwt.Builder |
header(java.lang.String name,
java.lang.Object value)
Use this header in the resulting
Jwt |
Jwt.Builder |
headers(java.util.function.Consumer<java.util.Map<java.lang.String,java.lang.Object>> headersConsumer)
Provides access to every
header(String, Object)
declared so far with the possibility to add, replace, or remove. |
Jwt.Builder |
issuedAt(java.time.Instant issuedAt)
Use this issued-at timestamp in the resulting
Jwt |
Jwt.Builder |
issuer(java.lang.String issuer)
Use this issuer in the resulting
Jwt |
Jwt.Builder |
jti(java.lang.String jti)
Use this identifier in the resulting
Jwt |
Jwt.Builder |
notBefore(java.time.Instant notBefore)
Use this not-before timestamp in the resulting
Jwt |
Jwt.Builder |
subject(java.lang.String subject)
Use this subject in the resulting
Jwt |
Jwt.Builder |
tokenValue(java.lang.String tokenValue)
Use this token value in the resulting
Jwt |
public Jwt.Builder tokenValue(java.lang.String tokenValue)
Jwt
tokenValue
- The token value to useJwt.Builder
for further configurationspublic Jwt.Builder claim(java.lang.String name, java.lang.Object value)
Jwt
name
- The claim namevalue
- The claim valueJwt.Builder
for further configurationspublic Jwt.Builder claims(java.util.function.Consumer<java.util.Map<java.lang.String,java.lang.Object>> claimsConsumer)
claim(String, Object)
declared so far with the possibility to add, replace, or remove.claimsConsumer
- the consumerJwt.Builder
for further configurationspublic Jwt.Builder header(java.lang.String name, java.lang.Object value)
Jwt
name
- The header namevalue
- The header valueJwt.Builder
for further configurationspublic Jwt.Builder headers(java.util.function.Consumer<java.util.Map<java.lang.String,java.lang.Object>> headersConsumer)
header(String, Object)
declared so far with the possibility to add, replace, or remove.headersConsumer
- the consumerJwt.Builder
for further configurationspublic Jwt.Builder audience(java.util.Collection<java.lang.String> audience)
Jwt
audience
- The audience(s) to useJwt.Builder
for further configurationspublic Jwt.Builder expiresAt(java.time.Instant expiresAt)
Jwt
expiresAt
- The expiration to useJwt.Builder
for further configurationspublic Jwt.Builder jti(java.lang.String jti)
Jwt
jti
- The identifier to useJwt.Builder
for further configurationspublic Jwt.Builder issuedAt(java.time.Instant issuedAt)
Jwt
issuedAt
- The issued-at timestamp to useJwt.Builder
for further configurationspublic Jwt.Builder issuer(java.lang.String issuer)
Jwt
issuer
- The issuer to useJwt.Builder
for further configurationspublic Jwt.Builder notBefore(java.time.Instant notBefore)
Jwt
notBefore
- The not-before timestamp to useJwt.Builder
for further configurationspublic Jwt.Builder subject(java.lang.String subject)
Jwt
subject
- The subject to useJwt.Builder
for further configurations