Packages

package handler

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. All

Type Members

  1. trait AuthHandler extends Handler[RoutingContext]

    Base interface for auth handlers.

    Base interface for auth handlers.

    An auth handler allows your application to provide authentication/authorization support.

    Auth handler requires a io.vertx.scala.ext.web.handler.SessionHandler to be on the routing chain before it.

  2. class BasicAuthHandler extends AuthHandler with Handler[RoutingContext]

    An auth handler that provides HTTP Basic Authentication support.

  3. class BodyHandler extends Handler[RoutingContext]

    A handler which gathers the entire request body and sets it on the .

    A handler which gathers the entire request body and sets it on the .

    It also handles HTTP file uploads and can be used to limit body sizes.

  4. class CSRFHandler extends Handler[RoutingContext]

    This handler adds a CSRF token to requests which mutate state.

    This handler adds a CSRF token to requests which mutate state. In order change the state a (XSRF-TOKEN) cookie is set with a unique token, that is expected to be sent back in a (X-XSRF-TOKEN) header.

    The behavior is to check the request body header and cookie for validity.

    This Handler requires session support, thus should be added somewhere below Session and Body handlers.

  5. class ChainAuthHandler extends AuthHandler with Handler[RoutingContext]

    An auth handler that chains to a sequence of handlers.

  6. class CookieHandler extends Handler[RoutingContext]

    A handler which decodes cookies from the request, makes them available in the and writes them back in the response.

    A handler which decodes cookies from the request, makes them available in the and writes them back in the response.

    Since 3.8.1 this handler simply calls the next request handler. This handler will be removed in Vert.x 4.

  7. class CorsHandler extends Handler[RoutingContext]

    A handler which implements server side http://www.w3.org/TR/cors/[CORS] support for Vert.x-Web.

  8. class DigestAuthHandler extends AuthHandler with Handler[RoutingContext]

    An auth handler that provides HTTP Basic Authentication support.

  9. class ErrorHandler extends Handler[RoutingContext]

    A pretty error handler for rendering error pages.

    A pretty error handler for rendering error pages. When working in development mode exception details will be returned in the server responses, otherwise or when manually specified no exception details are returned in the HTTP response.

    The reason the display of the exception details is by default dependent of the mode is to follow the security best practices: https://www.owasp.org/index.php/Improper_Error_Handling

  10. class FaviconHandler extends Handler[RoutingContext]

    A handler that serves favicons.

    A handler that serves favicons.

    If no file system path is specified it will attempt to serve a resource called favicon.ico from the classpath.

  11. class FormLoginHandler extends Handler[RoutingContext]

    Handler that handles login from a form on a custom login page.

    Handler that handles login from a form on a custom login page.

    Used in conjunction with the io.vertx.scala.ext.web.handler.RedirectAuthHandler.

  12. class JWTAuthHandler extends AuthHandler with Handler[RoutingContext]

    An auth handler that provides JWT Authentication support.

  13. class LoggerHandler extends Handler[RoutingContext]

    A handler which logs request information to the Vert.x logger.

    A handler which logs request information to the Vert.x logger. You should mount this handler before any handler that could fail the routing context

  14. class MultiTenantHandler extends Handler[RoutingContext]

    A handler which selectively executes another handler if a precondition is met.

    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".

  15. class OAuth2AuthHandler extends AuthHandler with Handler[RoutingContext]

    An auth handler that provides OAuth2 Authentication support.

    An auth handler that provides OAuth2 Authentication support. This handler is suitable for AuthCode flows.

  16. class RedirectAuthHandler extends AuthHandler with Handler[RoutingContext]

    An auth handler that's used to handle auth by redirecting user to a custom login page.

  17. class ResponseContentTypeHandler extends Handler[RoutingContext]

    A handler which sets the response content type automatically according to the best Accept header match.

    A handler which sets the response content type automatically according to the best Accept header match.

    The header is set only if:

  18. class ResponseTimeHandler extends Handler[RoutingContext]

    Handler which adds a header x-response-time in the response of matching requests containing the time taken in ms to process the request.

  19. class SessionHandler extends Handler[RoutingContext]

    A handler that maintains a io.vertx.scala.ext.web.Session for each browser session.

    A handler that maintains a io.vertx.scala.ext.web.Session for each browser session.

    It looks up the session for each request based on a session cookie which contains a session ID. It stores the session when the response is ended in the session store.

    The session is available on the routing context with .

  20. class StaticHandler extends Handler[RoutingContext]

    A handler for serving static resources from the file system or classpath.

  21. class TemplateHandler extends Handler[RoutingContext]

    A handler which renders responses using a template engine and where the template name is selected from the URI path.

  22. class TimeoutHandler extends Handler[RoutingContext]

    Handler that will timeout requests if the response has not been written after a certain time.

    Handler that will timeout requests if the response has not been written after a certain time. Timeout requests will be ended with an HTTP status code 503.

  23. class UserSessionHandler extends Handler[RoutingContext]

    This handler should be used if you want to store the User object in the Session so it's available between different requests, without you having re-authenticate each time.

    This handler should be used if you want to store the User object in the Session so it's available between different requests, without you having re-authenticate each time.

    It requires that the session handler is already present on previous matching routes.

    It requires an Auth provider so, if the user is deserialized from a clustered session it knows which Auth provider to associate the session with.

  24. class VirtualHostHandler extends Handler[RoutingContext]

    Handler that will filter requests based on the request Host name.

Ungrouped