Package io.vertx.mutiny.ext.web.handler
Class APIKeyHandler
- java.lang.Object
-
- io.vertx.mutiny.ext.web.handler.APIKeyHandler
-
- All Implemented Interfaces:
io.vertx.core.Handler<RoutingContext>
,AuthenticationHandler
,Consumer<RoutingContext>
public class APIKeyHandler extends Object implements AuthenticationHandler, io.vertx.core.Handler<RoutingContext>, Consumer<RoutingContext>
An authentication handler that provides API Key support. API keys can be extracted fromHTTP headers/query parameters/cookies
. By default this handler will extract the API key from an HTTP header namedX-API-KEY
. NOTE: This class has been automatically generated from theoriginal
non Mutiny-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<APIKeyHandler>
__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description APIKeyHandler(io.vertx.ext.web.handler.APIKeyHandler delegate)
APIKeyHandler(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(RoutingContext item)
APIKeyHandler
cookie(String cookieName)
static APIKeyHandler
create(AuthenticationProvider authProvider)
boolean
equals(Object o)
io.vertx.ext.web.handler.APIKeyHandler
getDelegate()
void
handle(RoutingContext arg0)
int
hashCode()
APIKeyHandler
header(String headerName)
static APIKeyHandler
newInstance(io.vertx.ext.web.handler.APIKeyHandler arg)
APIKeyHandler
parameter(String paramName)
String
toString()
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<APIKeyHandler> __TYPE_ARG
-
-
Constructor Detail
-
APIKeyHandler
public APIKeyHandler(io.vertx.ext.web.handler.APIKeyHandler delegate)
-
APIKeyHandler
public APIKeyHandler(Object delegate)
-
-
Method Detail
-
getDelegate
public io.vertx.ext.web.handler.APIKeyHandler getDelegate()
- Specified by:
getDelegate
in interfaceAuthenticationHandler
-
handle
public void handle(RoutingContext arg0)
- Specified by:
handle
in interfaceAuthenticationHandler
- Specified by:
handle
in interfaceio.vertx.core.Handler<RoutingContext>
-
create
public static APIKeyHandler create(AuthenticationProvider authProvider)
- Parameters:
authProvider
- the auth provider to use- Returns:
- the auth handler
-
header
public APIKeyHandler header(String headerName)
- Parameters:
headerName
- the header name containing the API key- Returns:
- fluent self
-
parameter
public APIKeyHandler parameter(String paramName)
- Parameters:
paramName
- the parameter name containing the API key- Returns:
- fluent self
-
cookie
public APIKeyHandler cookie(String cookieName)
- Parameters:
cookieName
- the cookie name containing the API key- Returns:
- fluent self
-
accept
public void accept(RoutingContext item)
- Specified by:
accept
in interfaceAuthenticationHandler
- Specified by:
accept
in interfaceConsumer<RoutingContext>
-
newInstance
public static APIKeyHandler newInstance(io.vertx.ext.web.handler.APIKeyHandler arg)
-
-