Package io.vertx.mutiny.ext.web.handler
Class APIKeyHandler
java.lang.Object
io.vertx.mutiny.ext.web.handler.APIKeyHandler
- All Implemented Interfaces:
MutinyDelegate
,io.vertx.core.Handler<RoutingContext>
,AuthenticationHandler
,Consumer<RoutingContext>
public class APIKeyHandler
extends Object
implements MutinyDelegate, AuthenticationHandler, io.vertx.core.Handler<RoutingContext>, Consumer<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 Mutiny-ified interface using Vert.x codegen.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAPIKeyHandler
(io.vertx.ext.web.handler.APIKeyHandler delegate) APIKeyHandler
(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(RoutingContext item) static APIKeyHandler
create
(AuthenticationProvider authProvider) boolean
io.vertx.ext.web.handler.APIKeyHandler
void
handle
(RoutingContext arg0) int
hashCode()
static APIKeyHandler
newInstance
(io.vertx.ext.web.handler.APIKeyHandler arg) toString()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
APIKeyHandler
public APIKeyHandler(io.vertx.ext.web.handler.APIKeyHandler delegate) -
APIKeyHandler
-
-
Method Details
-
getDelegate
public io.vertx.ext.web.handler.APIKeyHandler getDelegate()- Specified by:
getDelegate
in interfaceAuthenticationHandler
- Specified by:
getDelegate
in interfaceMutinyDelegate
- Returns:
- the delegate used by this Mutiny object of generated type
-
toString
-
equals
-
hashCode
public int hashCode() -
handle
- Specified by:
handle
in interfaceAuthenticationHandler
- Specified by:
handle
in interfaceio.vertx.core.Handler<RoutingContext>
-
create
- Parameters:
authProvider
- the auth provider to use- Returns:
- the auth handler
-
header
- Parameters:
headerName
- the header name containing the API key- Returns:
- fluent self
-
parameter
- Parameters:
paramName
- the parameter name containing the API key- Returns:
- fluent self
-
cookie
- Parameters:
cookieName
- the cookie name containing the API key- Returns:
- fluent self
-
accept
- Specified by:
accept
in interfaceAuthenticationHandler
- Specified by:
accept
in interfaceConsumer<RoutingContext>
-
newInstance
-