io.vertx.rxjava3.ext.web.handler

## Class APIKeyHandler

- java.lang.Object
- - io.vertx.rxjava3.ext.web.handler.APIKeyHandler

- All Implemented Interfaces:
    Handler<RoutingContext>, AuthenticationHandler

      public class APIKeyHandler
      extends Object
      implements AuthenticationHandler, Handler<RoutingContext>

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

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

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static io.vertx.lang.rx.TypeArg<APIKeyHandler>` | `__TYPE_ARG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `APIKeyHandler(APIKeyHandler delegate)`
    `APIKeyHandler(Object delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete 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
    `boolean` | `equals(Object o)`
    `APIKeyHandler` | `getDelegate()`
    `void` | `handle(RoutingContext event)` Something has happened, so handle it.
    `int` | `hashCode()`
    `APIKeyHandler` | `header(String headerName)` Specify the source for the api key extraction as an HTTP header with the given name.
    `static APIKeyHandler` | `newInstance(APIKeyHandler arg)`
    `APIKeyHandler` | `parameter(String paramName)` Specify the source for the api key extraction as an HTTP query parameter with the given name.
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface io.vertx.rxjava3.ext.web.handler.AuthenticationHandler

      `newInstance`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final io.vertx.lang.rx.TypeArg<APIKeyHandler> __TYPE_ARG

  - ### Constructor Detail

    - #### APIKeyHandler

          public APIKeyHandler(APIKeyHandler delegate)

    - #### APIKeyHandler

          public APIKeyHandler(Object delegate)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### getDelegate

          public APIKeyHandler getDelegate()

      Specified by:
        `getDelegate` in interface `AuthenticationHandler`

    - #### handle

          public void handle(RoutingContext event)

      Something has happened, so handle it.
      Specified by:
        `handle` in interface `Handler<RoutingContext>`
      Specified by:
        `handle` in interface `AuthenticationHandler`
      Parameters:
        `event` - the event to handle

    - #### create

          public static APIKeyHandler create(AuthenticationProvider authProvider)

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

    - #### header

          public 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

          public 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

          public 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

    - #### newInstance

          public static APIKeyHandler newInstance(APIKeyHandler arg)

Copyright © 2022 Eclipse. All rights reserved.