Package org.apache.oltu.oauth2.jwt
Class JWT.Builder
- java.lang.Object
-
- org.apache.oltu.commons.json.CustomizableBuilder<JWT>
-
- org.apache.oltu.oauth2.jwt.JWT.Builder
-
- Enclosing class:
- JWT
public static final class JWT.Builder extends CustomizableBuilder<JWT>
A simpleJWTbuilder.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JWTbuild()Creates a newJWTinstance.JWT.BuildersetClaimsSetAudience(java.lang.String claimsSetAudience)Sets the JWT Claims Setaudfor a single audience.JWT.BuildersetClaimsSetAudiences(java.util.List<java.lang.String> claimsSetAudiences)Sets the JWT Claims Setaud.JWT.BuildersetClaimsSetCustomField(java.lang.String key, java.lang.Object value)Set the JWT Claims Set custom field.JWT.BuildersetClaimsSetExpirationTime(long claimsSetExpirationTime)Sets the JWT Claims Setexp.JWT.BuildersetClaimsSetIssuedAt(long claimsSetIssuedAt)Sets the JWT Claims SetissuedAt.JWT.BuildersetClaimsSetIssuer(java.lang.String claimsSetIssuer)Sets the JWT Claims Setiss.JWT.BuildersetClaimsSetJwdId(java.lang.String claimsSetJwdId)Sets the JWT Claims Setjti.JWT.BuildersetClaimsSetNotBefore(java.lang.String claimsSetNotBefore)Sets the JWT Claims Setnbf.JWT.BuildersetClaimsSetSubject(java.lang.String claimsSetSubject)Sets the JWT Claims Setsub.JWT.BuildersetClaimsSetType(java.lang.String claimsSetType)Sets the JWT Claims Settyp.JWT.BuildersetHeaderAlgorithm(java.lang.String headerAlgorithm)Sets the JWT Headeralg.JWT.BuildersetHeaderContentType(java.lang.String headerContentType)Sets the JWT Headercty.JWT.BuildersetHeaderCustomField(java.lang.String key, java.lang.Object value)Set the JWT Header custom field.JWT.BuildersetHeaderType(java.lang.String headerType)Sets the JWT Headertyp.JWT.BuildersetSignature(java.lang.String signature)Sets the JWT signature.-
Methods inherited from class org.apache.oltu.commons.json.CustomizableBuilder
setCustomField
-
-
-
-
Method Detail
-
setHeaderType
public JWT.Builder setHeaderType(java.lang.String headerType)
Sets the JWT Headertyp.- Parameters:
headerType- the JWT Headertyp.- Returns:
- this builder instance.
-
setHeaderAlgorithm
public JWT.Builder setHeaderAlgorithm(java.lang.String headerAlgorithm)
Sets the JWT Headeralg.- Parameters:
headerAlgorithm- the JWT Headeralg.- Returns:
- this builder instance.
-
setHeaderContentType
public JWT.Builder setHeaderContentType(java.lang.String headerContentType)
Sets the JWT Headercty.- Parameters:
headerContentType- the JWT Headercty.- Returns:
- this builder instance.
-
setHeaderCustomField
public JWT.Builder setHeaderCustomField(java.lang.String key, java.lang.Object value)
Set the JWT Header custom field.- Parameters:
key- the custom field name.value- value the custom field value.- Returns:
- this builder instance.
-
setClaimsSetIssuer
public JWT.Builder setClaimsSetIssuer(java.lang.String claimsSetIssuer)
Sets the JWT Claims Setiss.- Parameters:
claimsSetIssuer- the JWT Claims Setiss.- Returns:
- this builder instance.
-
setClaimsSetSubject
public JWT.Builder setClaimsSetSubject(java.lang.String claimsSetSubject)
Sets the JWT Claims Setsub.- Parameters:
claimsSetSubject- the JWT Claims Setsub.- Returns:
- this builder instance.
-
setClaimsSetAudience
public JWT.Builder setClaimsSetAudience(java.lang.String claimsSetAudience)
Sets the JWT Claims Setaudfor a single audience.- Parameters:
claimsSetAudience- the JWT Claims Setaud.- Returns:
- this builder instance.
-
setClaimsSetAudiences
public JWT.Builder setClaimsSetAudiences(java.util.List<java.lang.String> claimsSetAudiences)
Sets the JWT Claims Setaud.- Parameters:
claimsSetAudiences- the JWT Claims Setaud.- Returns:
- this builder instance.
-
setClaimsSetExpirationTime
public JWT.Builder setClaimsSetExpirationTime(long claimsSetExpirationTime)
Sets the JWT Claims Setexp.- Parameters:
claimsSetExpirationTime- the JWT Claims Setexp.- Returns:
- this builder instance.
-
setClaimsSetNotBefore
public JWT.Builder setClaimsSetNotBefore(java.lang.String claimsSetNotBefore)
Sets the JWT Claims Setnbf.- Parameters:
claimsSetNotBefore- the JWT Claims Setnbf.- Returns:
- this builder instance.
-
setClaimsSetIssuedAt
public JWT.Builder setClaimsSetIssuedAt(long claimsSetIssuedAt)
Sets the JWT Claims SetissuedAt.- Parameters:
claimsSetIssuedAt- the JWT Claims SetissuedAt.- Returns:
- this builder instance.
-
setClaimsSetJwdId
public JWT.Builder setClaimsSetJwdId(java.lang.String claimsSetJwdId)
Sets the JWT Claims Setjti.- Parameters:
claimsSetJwdId- the JWT Claims Setjti.- Returns:
- this builder instance.
-
setClaimsSetType
public JWT.Builder setClaimsSetType(java.lang.String claimsSetType)
Sets the JWT Claims Settyp.- Parameters:
claimsSetType- the JWT Claims Settyp.- Returns:
- this builder instance.
-
setClaimsSetCustomField
public JWT.Builder setClaimsSetCustomField(java.lang.String key, java.lang.Object value)
Set the JWT Claims Set custom field.- Parameters:
key- the custom field name.value- value the custom field value.- Returns:
- this builder instance.
-
setSignature
public JWT.Builder setSignature(java.lang.String signature)
Sets the JWT signature.- Parameters:
signature-- Returns:
- this builder instance.
-
-