http4k / org.http4k.contract.security / ApiKeySecurity
class ApiKeySecurity<out T> :
Security
Checks the presence of the named Api Key parameter. Filter returns 401 if Api-Key is not found in request.
Default implementation of ApiKey. Includes an option to NOT authorise OPTIONS requests, which is currently not enabled for OpenAPI.
Name | Summary |
---|---|
<init> | Checks the presence of the named Api Key parameter. Filter returns 401 if Api-Key is not found in request.ApiKeySecurity(param: Lens < Request , T>, validateKey: (T) -> Boolean , authorizeOptionsRequests: Boolean = true, name: String = "api_key") |
Name | Summary |
---|---|
filter | val filter: <ERROR CLASS> |
name | val name: String |
param | val param: Lens < Request , T> |
Name | Summary |
---|---|
and | fun Security .and(that: Security ): Security |
or | fun Security .or(that: Security ): Security |
Name | Summary |
---|---|
renderer | val ApiKeySecurity.Companion.renderer: SecurityRenderer |
renderer | val ApiKeySecurity.Companion.renderer: SecurityRenderer |