Class EagerSecurityInterceptorCandidateBuildItem


  • public final class EagerSecurityInterceptorCandidateBuildItem
    extends io.quarkus.builder.item.MultiBuildItem
    Vert.X route handlers run before REST layer can't determine which endpoint is going to be invoked, what are endpoint annotations etc. Therefore, security setting that requires knowledge of invoked method (initial intention is to provide this with RESTEasy Reactive resources, however the principle is applicable to other stacks as well) and needs to be run prior to any security check should use this build item. The build item is only required for stacks that do not run security checks via CDI interceptors, as there, you can simply use interceptor with higher priority.
    • Constructor Detail

      • EagerSecurityInterceptorCandidateBuildItem

        public EagerSecurityInterceptorCandidateBuildItem​(org.jboss.jandex.MethodInfo methodInfo,
                                                          io.quarkus.runtime.RuntimeValue<io.quarkus.security.spi.runtime.MethodDescription> descriptionRuntimeValue,
                                                          Consumer<io.vertx.ext.web.RoutingContext> securityInterceptor)
        Parameters:
        methodInfo - endpoint candidate; extensions exposing endpoints has final say on what is endpoint
        descriptionRuntimeValue - endpoint candidate transformed into description
        securityInterceptor - piece of code that should be run before SecurityCheck for annotated method is invoked; must be recorded during static init
    • Method Detail

      • hasProperEndpointModifiers

        public static boolean hasProperEndpointModifiers​(org.jboss.jandex.MethodInfo info)
      • getMethodInfo

        org.jboss.jandex.MethodInfo getMethodInfo()
      • getDescriptionRuntimeValue

        io.quarkus.runtime.RuntimeValue<io.quarkus.security.spi.runtime.MethodDescription> getDescriptionRuntimeValue()
      • getSecurityInterceptor

        Consumer<io.vertx.ext.web.RoutingContext> getSecurityInterceptor()