Class JwksTokenValidator

java.lang.Object
io.fluxzero.idp.client.JwksTokenValidator
All Implemented Interfaces:
TokenValidator

public class JwksTokenValidator extends Object implements TokenValidator
Default Fluxzero OIDC token validator for RS256 JWTs exposed through a tenant JWKS endpoint.

This is the production-oriented validator. It discovers the issuer metadata, fetches the JWKS, caches RSA signing keys by issuer and validates RS256 signatures. It also enforces the registered claims that make a token usable by a Fluxzero application: exact issuer match, non-empty subject, configured audience, optional Fluxzero token_use, and the iat, nbf and exp validity window.

The local stub IDP should not weaken this class. Test-specific trust belongs in another TokenValidator implementation on the test classpath so application code can keep calling TokenValidators.validate(TokenValidationRequest) in both environments.

  • Constructor Details

    • JwksTokenValidator

      public JwksTokenValidator()
  • Method Details

    • validate

      public JwtClaims validate(TokenValidationRequest request)
      Description copied from interface: TokenValidator
      Validates the token and returns normalized claims.
      Specified by:
      validate in interface TokenValidator
      Parameters:
      request - the token, issuer and audience expectations
      Returns:
      normalized claims from a valid token