Class SwitchableJWKURLResolver

java.lang.Object
io.inverno.mod.security.jose.internal.jwk.SwitchableJWKURLResolver
All Implemented Interfaces:
JWKURLResolver

public class SwitchableJWKURLResolver extends Object implements JWKURLResolver

A wrapper for the JWKURLResolver which can switch off JWK Set URL and X.509 certificate URL resolution by configuration.

The JWKURLResolver is used in GenericJWKService.read(java.net.URI) to resolve JWK sets explicitly and indirectly in JOSEObjectBuilder to resolve keys from the jku properties. We only want to disable resolution when building or reading JOSE objects and always have it enabled otherwise.

The URL resolution can be disabled by configuration (see JOSEConfiguration.resolve_jku() and JOSEConfiguration.resolve_x5u()).

Since:
1.5
Author:
Jeremy Kuhn
  • Constructor Details

    • SwitchableJWKURLResolver

      public SwitchableJWKURLResolver(JOSEConfiguration configuration, JWKURLResolver urlResolver)

      Wraps the specified JWK URL resolver to make it switchable.

      Parameters:
      configuration - the JOSE module configuration
      urlResolver - the modume JWK URL resolver
  • Method Details