io.vertx.ext.web.handler

## Interface AuthenticationHandler

- All Superinterfaces:
    Handler<RoutingContext>
  All Known Subinterfaces:
    AuthHandler, BasicAuthHandler, ChainAuthHandler, DigestAuthHandler, JWTAuthHandler, OAuth2AuthHandler, RedirectAuthHandler

      public interface AuthenticationHandler
      extends Handler<RoutingContext>

  Base interface for auth handlers.

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

  Auth handler requires a `SessionHandler` to be on the routing chain before it.

  Author:
    Tim Fox, Paulo Lopes

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default String` | `authenticateHeader(RoutingContext context)` Returns
    `default Future<Credentials>` | `parseCredentials(RoutingContext context)`
    `void` | `parseCredentials(RoutingContext context, Handler<AsyncResult<Credentials>> handler)` Parses the credentials from the request into a JsonObject.
    `default void` | `postAuthentication(RoutingContext ctx)` This method is called to perform any post authentication tasks, such as redirects.

    - ### Methods inherited from interface io.vertx.core.Handler

      `handle`

- - ### Method Detail

    - #### parseCredentials

          void parseCredentials(RoutingContext context,
                                Handler<AsyncResult<Credentials>> handler)

      Parses the credentials from the request into a JsonObject. The implementation should be able to extract the required info for the auth provider in the format the provider expects.
      Parameters:
        `context` - the routing context
        `handler` - the handler to be called once the information is available.

    - #### parseCredentials

          default Future<Credentials> parseCredentials(RoutingContext context)

      Parameters:
        `context` - the routing context
      Returns:
        Future json
      See Also:
        `parseCredentials(RoutingContext, Handler)`

    - #### authenticateHeader

          default String authenticateHeader(RoutingContext context)

      Returns
      Parameters:
        `context` -
      Returns:

    - #### postAuthentication

          default void postAuthentication(RoutingContext ctx)

      This method is called to perform any post authentication tasks, such as redirects. Overrides must call context.next() on success.
      Parameters:
        `ctx` - the routing context

Copyright © 2021 Eclipse. All rights reserved.