public interface APIKeyHandler extends AuthenticationHandler
HTTP headers/query parameters/cookies
.
By default this handler will extract the API key from an HTTP header named X-API-KEY
.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
|
APIKeyHandler |
header(String headerName)
Specify the source for the api key extraction as an HTTP header with the given name.
|
APIKeyHandler |
parameter(String paramName)
Specify the source for the api key extraction as an HTTP query parameter with the given name.
|
static APIKeyHandler create(AuthenticationProvider authProvider)
authProvider
- the auth provider to useAPIKeyHandler header(String headerName)
headerName
- the header name containing the API keyAPIKeyHandler parameter(String paramName)
paramName
- the parameter name containing the API keyAPIKeyHandler cookie(String cookieName)
cookieName
- the cookie name containing the API keyCopyright © 2023 Eclipse. All rights reserved.