Class KeysController

java.lang.Object
io.micronaut.security.token.jwt.endpoints.KeysController

@Requires(classes=io.micronaut.http.annotation.Controller.class) @Requires(property="micronaut.security.endpoints.keys.enabled",notEquals="false",defaultValue="true") @Requires(beans={JwkProvider.class,io.micronaut.json.JsonMapper.class}) @Controller("${micronaut.security.endpoints.keys.path:/keys}") @Secured("isAnonymous()") public class KeysController extends Object
Endpoint which exposes a JSON Web Key Set built with the JWK provided by JwkProvider beans.
Since:
1.1.0
Author:
Sergio del Amo
  • Constructor Details

    • KeysController

      public KeysController(Collection<JwkProvider> jwkProviders, io.micronaut.json.JsonMapper jsonMapper)
      Instantiates a KeysController.
      Parameters:
      jwkProviders - a collection of JSON Web Key providers.
      jsonMapper - Jackson ObjectMapper used to do serialization.
      Since:
      3.3
  • Method Details

    • keys

      @Get @SingleResult public org.reactivestreams.Publisher<String> keys()
      Returns:
      a JSON Web Key Set (JWKS) payload.