Package org.apache.oltu.oauth2.jwt
Class JWT.Builder
- Enclosing class:
JWT
A simple
JWT builder.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Creates a newJWTinstance.setClaimsSetAudience(String claimsSetAudience) Sets the JWT Claims Setaudfor a single audience.setClaimsSetAudiences(List<String> claimsSetAudiences) Sets the JWT Claims Setaud.setClaimsSetCustomField(String key, Object value) Set the JWT Claims Set custom field.setClaimsSetExpirationTime(long claimsSetExpirationTime) Sets the JWT Claims Setexp.setClaimsSetIssuedAt(long claimsSetIssuedAt) Sets the JWT Claims SetissuedAt.setClaimsSetIssuer(String claimsSetIssuer) Sets the JWT Claims Setiss.setClaimsSetJwdId(String claimsSetJwdId) Sets the JWT Claims Setjti.setClaimsSetNotBefore(String claimsSetNotBefore) Sets the JWT Claims Setnbf.setClaimsSetSubject(String claimsSetSubject) Sets the JWT Claims Setsub.setClaimsSetType(String claimsSetType) Sets the JWT Claims Settyp.setHeaderAlgorithm(String headerAlgorithm) Sets the JWT Headeralg.setHeaderContentType(String headerContentType) Sets the JWT Headercty.setHeaderCustomField(String key, Object value) Set the JWT Header custom field.setHeaderType(String headerType) Sets the JWT Headertyp.setSignature(String signature) Sets the JWT signature.Methods inherited from class org.apache.oltu.commons.json.CustomizableBuilder
setCustomField
-
Constructor Details
-
Builder
public Builder() -
Builder
-
-
Method Details
-
setHeaderType
Sets the JWT Headertyp.- Parameters:
headerType- the JWT Headertyp.- Returns:
- this builder instance.
-
setHeaderAlgorithm
Sets the JWT Headeralg.- Parameters:
headerAlgorithm- the JWT Headeralg.- Returns:
- this builder instance.
-
setHeaderContentType
Sets the JWT Headercty.- Parameters:
headerContentType- the JWT Headercty.- Returns:
- this builder instance.
-
setHeaderCustomField
Set the JWT Header custom field.- Parameters:
key- the custom field name.value- value the custom field value.- Returns:
- this builder instance.
-
setClaimsSetIssuer
Sets the JWT Claims Setiss.- Parameters:
claimsSetIssuer- the JWT Claims Setiss.- Returns:
- this builder instance.
-
setClaimsSetSubject
Sets the JWT Claims Setsub.- Parameters:
claimsSetSubject- the JWT Claims Setsub.- Returns:
- this builder instance.
-
setClaimsSetAudience
Sets the JWT Claims Setaudfor a single audience.- Parameters:
claimsSetAudience- the JWT Claims Setaud.- Returns:
- this builder instance.
-
setClaimsSetAudiences
Sets the JWT Claims Setaud.- Parameters:
claimsSetAudiences- the JWT Claims Setaud.- Returns:
- this builder instance.
-
setClaimsSetExpirationTime
Sets the JWT Claims Setexp.- Parameters:
claimsSetExpirationTime- the JWT Claims Setexp.- Returns:
- this builder instance.
-
setClaimsSetNotBefore
Sets the JWT Claims Setnbf.- Parameters:
claimsSetNotBefore- the JWT Claims Setnbf.- Returns:
- this builder instance.
-
setClaimsSetIssuedAt
Sets the JWT Claims SetissuedAt.- Parameters:
claimsSetIssuedAt- the JWT Claims SetissuedAt.- Returns:
- this builder instance.
-
setClaimsSetJwdId
Sets the JWT Claims Setjti.- Parameters:
claimsSetJwdId- the JWT Claims Setjti.- Returns:
- this builder instance.
-
setClaimsSetType
Sets the JWT Claims Settyp.- Parameters:
claimsSetType- the JWT Claims Settyp.- Returns:
- this builder instance.
-
setClaimsSetCustomField
Set the JWT Claims Set custom field.- Parameters:
key- the custom field name.value- value the custom field value.- Returns:
- this builder instance.
-
setSignature
Sets the JWT signature.- Parameters:
signature-- Returns:
- this builder instance.
-
build
Creates a newJWTinstance.- Specified by:
buildin classCustomizableBuilder<JWT>- Returns:
- a new
JWTinstance.
-