Class MultiTenantHandler

  • All Implemented Interfaces:
    io.vertx.core.Handler<RoutingContext>, Consumer<RoutingContext>

    public class MultiTenantHandler
    extends Object
    implements io.vertx.core.Handler<RoutingContext>, Consumer<RoutingContext>
    A handler which selectively executes another handler if a precondition is met. There are cases where applications are build as multi tenant, in this cases one of the common tasks is to configure different authentication mechanisms for each tenant. This handler will allow registering any other handler and will only execute it if the precondition is met. There are 2 way of defining a precondition:
    • A http header value for example
      X-Tenant
    • A custom extractor function that can return a String from the context
    Requests that pass the validation will contain a new key in the routing context with the tenant id, for the case of being a default handler the value if this key will be "default".

    NOTE: This class has been automatically generated from the original non Mutiny-ified interface using Vert.x codegen.

    • Constructor Detail

      • MultiTenantHandler

        public MultiTenantHandler​(io.vertx.ext.web.handler.MultiTenantHandler delegate)
      • MultiTenantHandler

        public MultiTenantHandler​(Object delegate)