Package io.quarkus.vertx.http.deployment
Class FilterBuildItem
java.lang.Object
io.quarkus.builder.item.BuildItem
io.quarkus.builder.item.MultiBuildItem
io.quarkus.vertx.http.deployment.FilterBuildItem
public final class FilterBuildItem
extends io.quarkus.builder.item.MultiBuildItem
A handler that is applied to every route
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionFilterBuildItem(io.vertx.core.Handler<io.vertx.ext.web.RoutingContext> handler, int priority) Creates a new instance ofFilterBuildItem. -
Method Summary
Modifier and TypeMethodDescriptionio.vertx.core.Handler<io.vertx.ext.web.RoutingContext>intbooleanstatic FilterBuildItemofAuthenticationFailureHandler(io.vertx.core.Handler<io.vertx.ext.web.RoutingContext> authFailureHandler) Creates a new instance ofFilterBuildItemwith an authentication failure handler.static FilterBuildItemofPreAuthenticationFailureHandler(io.vertx.core.Handler<io.vertx.ext.web.RoutingContext> authFailureHandler) Creates a new instance ofFilterBuildItemwith an authentication failure handler.toFilter()
-
Field Details
-
CORS
public static final int CORS- See Also:
-
AUTHENTICATION
public static final int AUTHENTICATION- See Also:
-
AUTHORIZATION
public static final int AUTHORIZATION- See Also:
-
-
Constructor Details
-
FilterBuildItem
public FilterBuildItem(io.vertx.core.Handler<io.vertx.ext.web.RoutingContext> handler, int priority) Creates a new instance ofFilterBuildItem.- Parameters:
handler- the handler, ifnullthe filter won't be used.priority- the priority, higher priority gets invoked first. Priority is only used to sort filters, user routes are called afterwards. Must be positive.
-
-
Method Details
-
ofAuthenticationFailureHandler
public static FilterBuildItem ofAuthenticationFailureHandler(io.vertx.core.Handler<io.vertx.ext.web.RoutingContext> authFailureHandler) Creates a new instance ofFilterBuildItemwith an authentication failure handler. The handler will be added as next to last, right beforeQuarkusErrorHandler. -
ofPreAuthenticationFailureHandler
public static FilterBuildItem ofPreAuthenticationFailureHandler(io.vertx.core.Handler<io.vertx.ext.web.RoutingContext> authFailureHandler) Creates a new instance ofFilterBuildItemwith an authentication failure handler. The handler will be added right before any handlers added byofAuthenticationFailureHandler(Handler) -
getHandler
public io.vertx.core.Handler<io.vertx.ext.web.RoutingContext> getHandler() -
getPriority
public int getPriority() -
isFailureHandler
public boolean isFailureHandler() -
toFilter
- Returns:
- a filter object wrapping the handler and priority.
-