Class KeysController


  • @Requires(property="micronaut.security.endpoints.keys.enabled",notEquals="false",defaultValue="true") @Requires(beans=JwkProvider.class)
    @Controller("${micronaut.security.endpoints.keys.path:/keys}")
    @Secured("isAnonymous()")
    public class KeysController
    extends java.lang.Object
    Endpoint which exposes a JSON Web Key Set built with the JWK provided by JwkProvider beans.
    Since:
    1.1.0
    • Constructor Detail

      • KeysController

        @Deprecated
        public KeysController​(java.util.Collection<JwkProvider> jwkProviders,
                              com.fasterxml.jackson.databind.ObjectMapper objectMapper)
        Instantiates a KeysController.
        Parameters:
        jwkProviders - a collection of JSON Web Key providers.
        objectMapper - Jackson ObjectMapper used to do serialization.
      • KeysController

        @Inject
        public KeysController​(java.util.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 Detail

      • keys

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