Registry / auth / java-jwt

java-jwt

JSON →
library4.5.1javamavenunverified

Java library for creating and verifying JSON Web Tokens (JWT) on the Auth0 platform.

<dependency> <groupId>com.auth0</groupId> <artifactId>java-jwt</artifactId> <version>4.5.1</version> </dependency>
INSTALL
IMPORT
SIG · JAVA-JWT
J
java-jwt
authjavav4.5.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

JWT
com.auth0.jwt.JWT

Creates a JWT with HMAC256 signing.

import com.auth0.jwt.JWT; import com.auth0.jwt.algorithms.Algorithm; public class Main { public static void main(String[] args) { String token = JWT.create() .withSubject("1234567890") .sign(Algorithm.HMAC256("secret")); System.out.println(token); } }
Debug
Known issues
gotchaAlgorithm.HMAC256 expects a secret key of sufficient length (at least 256 bits).
fix
Use a strong, randomly generated secret key.
affects: all
Upgrade
Version history
4.5.1latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
17 hits · last 30 days
node
14
OpenAI (training)
1
Resources
java-jwt — mvn dependency:get java-jwt · libregistry