Package com.auth0.jwt
Class JWTCreator
java.lang.Object
com.auth0.jwt.JWTCreator
The JWTCreator class holds the sign method to generate a complete JWT (with Signature) from a given Header and Payload content.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
The Builder class holds the Claims that defines the JWT to be created. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static JWTCreator.Builder
init()
Initialize a JWTCreator instance.private String
sign()
-
Field Details
-
algorithm
-
headerJson
-
payloadJson
-
-
Constructor Details
-
JWTCreator
private JWTCreator(Algorithm algorithm, Map<String, Object> headerClaims, Map<String, throws JWTCreationExceptionObject> payloadClaims) - Throws:
JWTCreationException
-
-
Method Details
-
init
Initialize a JWTCreator instance.- Returns:
- a JWTCreator.Builder instance to configure.
-
sign
- Throws:
SignatureGenerationException
-