| 1 | # Authentication Configuration |
| 2 | |
| 3 | This extension allows to secure a set of APIs grouped by a web context. It inspects |
| 4 | all `web.http.<context>` and if the authentication is configured it applies the `AuthenticationRequestFilter` |
| 5 | to the `<context>` with the chosen `AuthenticationService`. The chosen `AuthenticationService` is currently registered |
| 6 | in the `ApiAuthenticationRegistry`. This will be removed once the `ApiAuthenticationRegistry` will be refactored out. |
| 7 | |
| 8 | ## Configuration |
| 9 | |
| 10 | | Key | Description | Mandatory | |
| 11 | |:--------------------------------|:-------------------------------------------------------------------------------------------|-----------| |
| 12 | | web.http.<context>.auth.type | The type of authentication to apply to the `<context>` | | |
| 13 | | web.http.<context>.auth.context | Override the name of the context in the `ApiAuthenticationRegistry` instead of `<context>` | | |
| 14 | |
| 15 | Depending on the `web.http.<context>.auth.type` chosen, additional properties might be required in order to configure |
| 16 | the `AuthenticationService`. |
| 17 | |
| 18 | Example of a complete configuration for a custom context with token based authentication |
| 19 | |
| 20 | ```properties |
| 21 | web.http.custom.path=/custom |
| 22 | web.http.custom.port=8081 |
| 23 | web.http.custom.auth.type=tokenbased |
| 24 | web.http.custom.auth.key=apiKey |
| 25 | ``` |