Package com.revetsec.jose
JwtValidator validates tokens with keys from a
StaticJwksSource or a RemoteJwksSource.
JwsSigner signs a typed JwtSigningHeader and
JwtClaimsSet with an application-owned RSA private key. Its
fromHeaderAndClaims method immediately releases a signed compact JWT with the default two-second
operation budget; withHeaderAndClaims provides optional configuration and signs only when its
builder's build() is called. The signer selects the algorithm and verifies every output against its
checked public projection before releasing a credential. The exact-byte signing API remains available.
Issuance claims are separate from validated JwtClaims; signing does not validate
claim meaning or grant permission.
Standalone public-key publication uses PublishedJwk and
JwksPublisher. It supports RSA, EC and Ed25519 verification keys, optional
certificate chains, and prepared GET/HEAD responses without configuring an OAuth authorization server.
It depends only on com.revetsec.json and the root package, apart from Revetsec's internal packages.
- Author:
- Mark Allen
-
ClassDescriptionA rejected JOSE input: a token that
JwtValidatorrefused, or a JSON Web Key Set document thatJwks.fromJsonResult(String)rejected.Why a JOSE input was rejected.Receives events fromJwtValidatorandRemoteJwksSource, for metrics, logs and alerts.One usable public key from aJwks: an RSA, EC (P-256, P-384 or P-521) or Ed25519 key that passed every rule for verifying JWS signatures (seeJwkSkipReason).A JSON Web Key Set (RFC 7517 section 5): the usable public verification keys of a key set document, in document order.Why a key in a JSON Web Key Set is not used.The outcome of parsing a JSON Web Key Set document with the default size and key-count limits.The input was rejected; this variant contains only a fixed reason.A JSON Web Key Set document passed the structural and resource-limit checks.Publishes an immutable snapshot of public verification keys without an OAuth authorization server, signing, storage, network access or background threads.Configures an immutable public key snapshot.An immutable HTTP response containing only public JWKS data.Where a validator gets the public keys that verify token signatures: a fixed key set (StaticJwksSource) or one fetched from a URI and kept up to date (RemoteJwksSource).Thrown when aRemoteJwksSourcehas no usable JSON Web Key Set for a call: the fetch failed, a recent failure is still suppressing fetches, the limit of two requests per cooldown held the call back, or the call's deadline ended while it waited for another caller's fetch.A JWS signature algorithm, named by itsalgheader value (RFC 7515 section 4.1.1, RFC 7518 section 3.1, RFC 8037 section 3.1 and RFC 9864).Signs compact JWS credentials with one application-owned key pair and one fixed algorithm.Configures one signing operation.A failure to sign with an application-owned RSA key, or to verify the signature before releasing it.Why signing failed.A JWT thatJwtValidator.validateResult(String)accepted: its signature verified with a trusted key, and its type, issuer, audience, lifetime and required claims passed.The claims of a validated JWT (RFC 7519 section 4).An immutable JWT claims set for signing (RFC 7519 section 4), with typed registered claims and JSON custom claims.Builds an outbound claims set.Immutable protected-header metadata for signing a JWT: its requiredtypeand optional key identifier and SHA-256 certificate thumbprint.Configures an immutable JWT signing header without signing or I/O.A supported JWT protected-headertypvalue used when signing a token.Thrown when a well-formed token fails a check: its algorithm, key, signature, type, issuer, audience, lifetime, required claims or confirmation claim.The outcome of JWT validation.The input was rejected; this variant contains only a fixed reason.A JWT passed all configured signature, header and claims checks.Validates JWTs in the JWS compact serialization (RFC 7519, RFC 7515) signed with a public key, for one expected issuer.Builds aJwtValidator.Thrown when a token or a JSON Web Key Set document cannot be parsed, or exceeds a limit.An immutable public signing key for publication in a JSON Web Key Set (RFC 7517).Configures an immutable published public key.A JSON Web Key Set fetched from a URI and cached, such as an OpenID provider'sjwks_uri.Builds aRemoteJwksSource.A fixed set of verification keys, which never changes and is never fetched.Thrown when a token uses a JOSE feature that Revetsec does not support: encryption, the JSON serialization, a critical header parameter, an unencoded or compressed payload, or a nested token.