Module io.inverno.mod.security.jose
Package io.inverno.mod.security.jose.jwt
Interface JWTClaimsSet.Builder<A extends JWTClaimsSet,B extends JWTClaimsSet.Builder<A,B>>
- Type Parameters:
A
- the JWT Claims set typeB
- the JWT Claims set builder type
- Enclosing class:
JWTClaimsSet
public static interface JWTClaimsSet.Builder<A extends JWTClaimsSet,B extends JWTClaimsSet.Builder<A,B>>
A JWT Claims set builder is used to build a JWT Claims set.
- Since:
- 1.5
- Author:
- Jeremy Kuhn
-
Method Summary
Modifier and TypeMethodDescriptionaddCustomClaim
(String name, Object value) Specifies a custom claim.Specifies the audience claim.build()
Builds the JWT Claims set.expirationTime
(Long exp) Specifies the expiration time claim as seconds since epoch.Specifies the expiration time claim as zoned date time.Specifies the issued at claim as seconds since epoch.issuedAt
(ZonedDateTime iat) Specifies the issued at claim as zoned date time.Specifies the issuer claim as a String.Specifies the issuer claim as a URI.Specifies the JWT id claim.Specifies the not before claim as seconds since epoch.notBefore
(ZonedDateTime nbf) Specifies the not before claim as zoned date time.Specifies the subject claim as a String.Specifies the subject claim as a URI.
-
Method Details
-
issuer
Specifies the issuer claim as a String.
- Parameters:
iss
- the issuer claim value- Returns:
- this builder
-
issuer
Specifies the issuer claim as a URI.
- Parameters:
iss
- the issuer claim value- Returns:
- this builder
-
subject
Specifies the subject claim as a String.
- Parameters:
sub
- the subject claim value- Returns:
- this builder
-
subject
Specifies the subject claim as a URI.
- Parameters:
sub
- the subject claim value- Returns:
- this builder
-
audience
Specifies the audience claim.
- Parameters:
aud
- the audience claim value- Returns:
- this builder
-
expirationTime
Specifies the expiration time claim as seconds since epoch.
- Parameters:
exp
- the expiration time claim value- Returns:
- this builder
-
expirationTime
Specifies the expiration time claim as zoned date time.
- Parameters:
exp
- the expiration time claim value- Returns:
- this builder
-
notBefore
Specifies the not before claim as seconds since epoch.
- Parameters:
nbf
- the not before claim value- Returns:
- this builder
-
notBefore
Specifies the not before claim as zoned date time.
- Parameters:
nbf
- the not before claim value- Returns:
- this builder
-
issuedAt
Specifies the issued at claim as seconds since epoch.
- Parameters:
iat
- the issued at claim value- Returns:
- this builder
-
issuedAt
Specifies the issued at claim as zoned date time.
- Parameters:
iat
- the issued at claim value- Returns:
- this builder
-
jwtId
Specifies the JWT id claim.
- Parameters:
jti
- the JWT id claim value- Returns:
- this builder
-
addCustomClaim
Specifies a custom claim.
- Parameters:
name
- the claim namevalue
- the claim value- Returns:
- this builder
-
build
Builds the JWT Claims set.
- Returns:
- a new JWT Claims set
- Throws:
JWTBuildException
- if there was an error building the JWT Claims set
-