This project has retired. For details please refer to its Attic page.
JWT.Builder | Apache Oltu - OAuth 2.0
public static final class

JWT.Builder

extends CustomizableBuilder<E>
java.lang.Object
   ↳ org.apache.oltu.commons.json.CustomizableBuilder<E>
     ↳ org.apache.oltu.oauth2.jwt.JWT.Builder

Class Overview

A simple JWT builder.

Summary

Public Constructors
JWT.Builder()
JWT.Builder(String rawString)
Public Methods
JWT build()
Creates a new JWT instance.
JWT.Builder setClaimsSetAudience(String claimsSetAudience)
Sets the JWT Claims Set aud.
JWT.Builder setClaimsSetCustomField(String key, Object value)
Set the JWT Claims Set custom field.
JWT.Builder setClaimsSetExpirationTime(long claimsSetExpirationTime)
Sets the JWT Claims Set exp.
JWT.Builder setClaimsSetIssuedAt(long claimsSetIssuedAt)
Sets the JWT Claims Set issuedAt.
JWT.Builder setClaimsSetIssuer(String claimsSetIssuer)
Sets the JWT Claims Set iss.
JWT.Builder setClaimsSetJwdId(String claimsSetJwdId)
Sets the JWT Claims Set jti.
JWT.Builder setClaimsSetNotBefore(String claimsSetNotBefore)
Sets the JWT Claims Set nbf.
JWT.Builder setClaimsSetSubject(String claimsSetSubject)
Sets the JWT Claims Set sub.
JWT.Builder setClaimsSetType(String claimsSetType)
Sets the JWT Claims Set typ.
JWT.Builder setHeaderAlgorithm(String headerAlgorithm)
Sets the JWT Header alg.
JWT.Builder setHeaderContentType(String headerContentType)
Sets the JWT Header cty.
JWT.Builder setHeaderCustomField(String key, Object value)
Set the JWT Header custom field.
JWT.Builder setHeaderType(String headerType)
Sets the JWT Header typ.
JWT.Builder setSignature(String signature)
Sets the JWT signature.
[Expand]
Inherited Methods
From class org.apache.oltu.commons.json.CustomizableBuilder
From class java.lang.Object

Public Constructors

public JWT.Builder ()

public JWT.Builder (String rawString)

Public Methods

public JWT build ()

Creates a new JWT instance.

Returns
  • a new JWT instance.

public JWT.Builder setClaimsSetAudience (String claimsSetAudience)

Sets the JWT Claims Set aud.

Parameters
claimsSetAudience the JWT Claims Set aud.
Returns
  • this builder instance.

public JWT.Builder setClaimsSetCustomField (String key, 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.

public JWT.Builder setClaimsSetExpirationTime (long claimsSetExpirationTime)

Sets the JWT Claims Set exp.

Parameters
claimsSetExpirationTime the JWT Claims Set exp.
Returns
  • this builder instance.

public JWT.Builder setClaimsSetIssuedAt (long claimsSetIssuedAt)

Sets the JWT Claims Set issuedAt.

Parameters
claimsSetIssuedAt the JWT Claims Set issuedAt.
Returns
  • this builder instance.

public JWT.Builder setClaimsSetIssuer (String claimsSetIssuer)

Sets the JWT Claims Set iss.

Parameters
claimsSetIssuer the JWT Claims Set iss.
Returns
  • this builder instance.

public JWT.Builder setClaimsSetJwdId (String claimsSetJwdId)

Sets the JWT Claims Set jti.

Parameters
claimsSetJwdId the JWT Claims Set jti.
Returns
  • this builder instance.

public JWT.Builder setClaimsSetNotBefore (String claimsSetNotBefore)

Sets the JWT Claims Set nbf.

Parameters
claimsSetNotBefore the JWT Claims Set nbf.
Returns
  • this builder instance.

public JWT.Builder setClaimsSetSubject (String claimsSetSubject)

Sets the JWT Claims Set sub.

Parameters
claimsSetSubject the JWT Claims Set sub.
Returns
  • this builder instance.

public JWT.Builder setClaimsSetType (String claimsSetType)

Sets the JWT Claims Set typ.

Parameters
claimsSetType the JWT Claims Set typ.
Returns
  • this builder instance.

public JWT.Builder setHeaderAlgorithm (String headerAlgorithm)

Sets the JWT Header alg.

Parameters
headerAlgorithm the JWT Header alg.
Returns
  • this builder instance.

public JWT.Builder setHeaderContentType (String headerContentType)

Sets the JWT Header cty.

Parameters
headerContentType the JWT Header cty.
Returns
  • this builder instance.

public JWT.Builder setHeaderCustomField (String key, Object value)

Set the JWT Header custom field.

Parameters
key the custom field name.
value value the custom field value.
Returns
  • this builder instance.

public JWT.Builder setHeaderType (String headerType)

Sets the JWT Header typ.

Parameters
headerType the JWT Header typ.
Returns
  • this builder instance.

public JWT.Builder setSignature (String signature)

Sets the JWT signature.

Returns
  • this builder instance.