- All Known Implementing Classes:
JwtBuilder
,SessionJwtBuilder
public interface WebTokenBuilder
Represents JSON Web Token (JWT) claims.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionSets the token audience URIs.build()
Builds aWebToken
instance based on provided claim values.Sets the time after which the JWT should not be accepted.iat()
Indicates thatbuild()
should set the issued at time to the current time.Sets the token issuer URI.jti()
Generates a unique token identifier.Provides a specific token identifier.Sets the time before which the JWT should not be accepted.Sets the nonce claim.Sets the subject of the JWT.
-
Method Details
-
jti
WebTokenBuilder jti()Generates a unique token identifier.- Returns:
- this
-
jti
Provides a specific token identifier.- Parameters:
tokenId
- token identifier- Returns:
- this
-
iss
Sets the token issuer URI.- Parameters:
issuer
-URI
- Returns:
- this
-
aud
Sets the token audience URIs.- Parameters:
audience
- at least oneURI
- Returns:
- this
-
sub
Sets the subject of the JWT.- Parameters:
subject
- (sub claim)- Returns:
- this
-
iat
WebTokenBuilder iat()Indicates thatbuild()
should set the issued at time to the current time.- Returns:
- this
-
nbf
Sets the time before which the JWT should not be accepted.- Parameters:
notBefore
- not before time (nbf claim)- Returns:
- this
-
exp
Sets the time after which the JWT should not be accepted.- Parameters:
expires
- token expiration time (exp claim)- Returns:
- this
-
nonce
Sets the nonce claim.- Parameters:
nonce
- nonce claim value- Returns:
- this
- See Also:
-
build
WebToken build()Builds aWebToken
instance based on provided claim values.- Returns:
WebToken
-