Auth0’s Java JWT library signs and verifies JSON Web Tokens on the JVM. It supports common JWS algorithms including HMAC, RSA, RSA-PSS, and ECDSA for server-side applications.
Overview
Java JWT implements JSON Web Token handling for JVM server applications. You create tokens with JWT.create(), attach claims, and sign with a chosen algorithm, then verify them with a JWTVerifier configured for required claims.
The library supports HS256 through HS512, RS256 through RS512, PS256 through PS512, and ES256 through ES512. JVM support for RSASSA-PSS on Java 8 may require an extra security provider such as BouncyCastle.
Documentation covers typical create-and-verify flows, with examples and API reference material. Android apps are directed to a separate JWTDecode.Android package instead of this server-focused build.
The project ships as a Maven or Gradle dependency for Java LTS releases 8, 11, 17, and 21.
Key features
- Create and sign JWTs with multiple JWS algorithms
- Verify tokens and enforce claim requirements
- Supports HMAC, RSA, RSA-PSS, and ECDSA signing
- JWTVerificationException on invalid tokens
- Maven and Gradle dependency installation
- Intended for server-side JVM applications
Use cases
- Issue signed access tokens in Java services
- Validate bearer tokens in API middleware
- Implement custom claim checks after verification