io.vertx.ext.web.handler

## Interface APIKeyHandler

- All Superinterfaces:
    AuthenticationHandler, Handler<RoutingContext>

      public interface APIKeyHandler
      extends AuthenticationHandler

  An authentication handler that provides API Key support. API keys can be extracted from `HTTP headers/query parameters/cookies`. By default this handler will extract the API key from an HTTP header named `X-API-KEY`.
  Author:
    Paulo Lopes

- - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `APIKeyHandler` | `cookie(String cookieName)` Specify the source for the api key extraction as an HTTP cookie with the given name.
    `static APIKeyHandler` | `create(AuthenticationProvider authProvider)` Create an API Key authentication handler
    `APIKeyHandler` | `header(String headerName)` Specify the source for the api key extraction as an HTTP header with the given name.
    `APIKeyHandler` | `parameter(String paramName)` Specify the source for the api key extraction as an HTTP query parameter with the given name.

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

      `handle`

- - ### Method Detail

    - #### create

          static APIKeyHandler create(AuthenticationProvider authProvider)

      Create an API Key authentication handler
      Parameters:
        `authProvider` - the auth provider to use
      Returns:
        the auth handler

    - #### header

          APIKeyHandler header(String headerName)

      Specify the source for the api key extraction as an HTTP header with the given name.
      Parameters:
        `headerName` - the header name containing the API key
      Returns:
        fluent self

    - #### parameter

          APIKeyHandler parameter(String paramName)

      Specify the source for the api key extraction as an HTTP query parameter with the given name.
      Parameters:
        `paramName` - the parameter name containing the API key
      Returns:
        fluent self

    - #### cookie

          APIKeyHandler cookie(String cookieName)

      Specify the source for the api key extraction as an HTTP cookie with the given name.
      Parameters:
        `cookieName` - the cookie name containing the API key
      Returns:
        fluent self

Copyright © 2021 Eclipse. All rights reserved.