public class JwtClaimsSetBuilder extends Object
See JwtClaimsSet for information on the JwtClaimsSet object that this builder
creates.
| Constructor and Description |
|---|
JwtClaimsSetBuilder() |
| Modifier and Type | Method and Description |
|---|---|
JwtClaimsSetBuilder |
aud(List<String> aud)
Sets the JWT's intended audience list in the Claims Set.
|
JwtClaimsSet |
build()
Creates a JwtClaimsSet instance from the claims set in this builder.
|
JwtClaimsSetBuilder |
claim(String key,
Object claim)
Adds a custom claim to the JWT Claims Set.
|
JwtClaimsSetBuilder |
claims(Map<String,Object> claims)
Sets all of the claims the JWT Claims Set with the values contained in the specified map.
|
JwtClaimsSetBuilder |
exp(Date exp)
Sets the expiration time of the JWT in the Claims Set.
|
JwtClaimsSetBuilder |
iat(Date iat)
Sets the time the JWT was issued at, in the Claims Set.
|
JwtClaimsSetBuilder |
iss(String iss)
Sets the issuer this JWT was issued by.
|
JwtClaimsSetBuilder |
iss(URI iss)
Sets the issuer this JWT was issued by.
|
JwtClaimsSetBuilder |
jti(String jti)
Sets the unique ID of the JWT.
|
JwtClaimsSetBuilder |
nbf(Date nbf)
Sets the time the JWT is not allowed to be processed before, in the Claims Set.
|
JwtClaimsSetBuilder |
sub(String sub)
Sets the subject this JWT is issued to.
|
JwtClaimsSetBuilder |
sub(URI sub)
Sets the subject this JWT is issued to.
|
JwtClaimsSetBuilder |
typ(JwtType typ)
Sets the type of the contents of the Claims Set.
|
public JwtClaimsSetBuilder claim(String key, Object claim)
key - The claim name.claim - The claim value.JwtClaimsSet.setClaim(String, Object)public JwtClaimsSetBuilder claims(Map<String,Object> claims)
claims - The Map to use to set the claims.JwtClaimsSet.setClaims(java.util.Map)public JwtClaimsSetBuilder typ(JwtType typ)
typ - The Claims Set content type.JwtClaimsSet.getType()public JwtClaimsSetBuilder jti(String jti)
jti - The JWT's ID.JwtClaimsSet.setJwtId(String)public JwtClaimsSetBuilder iss(String iss)
iss - The JWT's issuer.JwtClaimsSet.setIssuer(String)public JwtClaimsSetBuilder iss(URI iss)
iss - The JWT's issuer.JwtClaimsSet.setIssuer(java.net.URI)public JwtClaimsSetBuilder sub(String sub)
sub - The JWT's subject.JwtClaimsSet.setSubject(String)public JwtClaimsSetBuilder sub(URI sub)
sub - The JWT's subject.JwtClaimsSet.setSubject(java.net.URI)public JwtClaimsSetBuilder aud(List<String> aud)
aud - The JWT's audience.JwtClaimsSet.addAudience(String)public JwtClaimsSetBuilder iat(Date iat)
iat - The JWT's issued at time.JwtClaimsSet.setIssuedAtTime(java.util.Date)public JwtClaimsSetBuilder nbf(Date nbf)
nbf - The JWT's not before time.JwtClaimsSet.setNotBeforeTime(java.util.Date)public JwtClaimsSetBuilder exp(Date exp)
exp - The JWT's expiration time.JwtClaimsSet.setExpirationTime(java.util.Date)public JwtClaimsSet build()
Copyright © 2025 Open Identity Platform Community. All rights reserved.