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 TypeMethodDescriptionvoidaccept(RoutingContext item) static APIKeyHandlercreate(AuthenticationProvider authProvider) booleanio.vertx.ext.web.handler.APIKeyHandlervoidhandle(RoutingContext arg0) inthashCode()static APIKeyHandlernewInstance(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:
getDelegatein interfaceAuthenticationHandler- Specified by:
getDelegatein interfaceMutinyDelegate- Returns:
- the delegate used by this Mutiny object of generated type
-
toString
-
equals
-
hashCode
public int hashCode() -
handle
- Specified by:
handlein interfaceAuthenticationHandler- Specified by:
handlein 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:
acceptin interfaceAuthenticationHandler- Specified by:
acceptin interfaceConsumer<RoutingContext>
-
newInstance
-