Package org.forgerock.json.jose.builders
Class JwtBuilderFactory
java.lang.Object
org.forgerock.json.jose.builders.JwtBuilderFactory
A factory for getting builders for plaintext, signed and encrypted JWTs and reconstructing JWT strings back into
their relevant JWT objects.
- Since:
- 2.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclaims()
Creates a builder for building a JWT Claims Set to be used in the building of JWTs.Creates a builder for building an encrypted JWT into a base64url UTF-8 encoded JWT string.jws
(SigningHandler signingHandler) Creates a builder for building a signed JWT into a base64url UTF-8 encoded JWT string.jwt()
Creates a builder for building a plaintext JWT into base64url UTF-8 encoded JWT string.<T extends Jwt>
Treconstruct
(String jwtString, Class<T> jwtClass) Reconstructs the given JWT string into a JWT object of the specified type.
-
Constructor Details
-
JwtBuilderFactory
public JwtBuilderFactory()
-
-
Method Details
-
jwt
Creates a builder for building a plaintext JWT into base64url UTF-8 encoded JWT string.- Returns:
- The JwtBuilder instance that will build the plaintext JWT.
-
jws
Creates a builder for building a signed JWT into a base64url UTF-8 encoded JWT string.- Parameters:
signingHandler
- The SigningHandler instance used to sign the JWS.- Returns:
- The JwtBuilder instance that will build the signed JWT.
-
jwe
Creates a builder for building an encrypted JWT into a base64url UTF-8 encoded JWT string.- Parameters:
publicKey
- The public key that will be used to encrypted the JWT.- Returns:
- The JwtBuilder instance that will build the encrypted JWT.
-
claims
Creates a builder for building a JWT Claims Set to be used in the building of JWTs.- Returns:
- The JwtClaimsSetBuilder instance that will build the claims set.
-
reconstruct
Reconstructs the given JWT string into a JWT object of the specified type.- Type Parameters:
T
- The type of JWT the JWT string represents.- Parameters:
jwtString
- The JWT string.jwtClass
- The JWT class to reconstruct the JWT string to.- Returns:
- The reconstructed JWT object.
-