This is a Java library for creating and verifying JSON Web Tokens (JWTs), supporting multiple cryptographic signing algorithms including HMAC, RSA, and ECDSA. The library provides a builder pattern for constructing tokens with custom claims and algorithm selection, and offers separate verification methods that check signatures and validate standard claims such as expiration, issuer, and audience.
The library abstracts cryptographic algorithms behind a common interface, allowing pluggable signing and verification without coupling token creation to a specific algorithm. Tokens are represented as immutable objects after creation, ensuring thread-safe access and consistency in concurrent environments. Verification failures raise typed exceptions for issues like invalid signatures or expired claims, providing clear error handling.
The library covers the full lifecycle of JWT processing, from signing tokens with custom claims to parsing and verifying tokens against expected values. It supports token-based authentication workflows by enabling stateless session management through signed JSON tokens.