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 theoriginalnon 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 voidaccept(RoutingContext item)APIKeyHandlercookie(String cookieName)static APIKeyHandlercreate(AuthenticationProvider authProvider)booleanequals(Object o)io.vertx.ext.web.handler.APIKeyHandlergetDelegate()voidhandle(RoutingContext arg0)inthashCode()APIKeyHandlerheader(String headerName)static APIKeyHandlernewInstance(io.vertx.ext.web.handler.APIKeyHandler arg)APIKeyHandlerparameter(String paramName)StringtoString()
-
-
-
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:
getDelegatein interfaceAuthenticationHandler
-
handle
public void handle(RoutingContext arg0)
- Specified by:
handlein interfaceAuthenticationHandler- Specified by:
handlein 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:
acceptin interfaceAuthenticationHandler- Specified by:
acceptin interfaceConsumer<RoutingContext>
-
newInstance
public static APIKeyHandler newInstance(io.vertx.ext.web.handler.APIKeyHandler arg)
-
-