Package dev.dokimos.server.config
Class ApiKeyProperties
java.lang.Object
dev.dokimos.server.config.ApiKeyProperties
Configuration properties for API key authentication.
The API key can be configured via:
- Environment variable: DOKIMOS_API_KEY
- Application property: dokimos.api-key
When the API key is not set or empty, authentication is disabled and all requests are allowed.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true if API key authentication is enabled.void
-
Constructor Details
-
ApiKeyProperties
public ApiKeyProperties()
-
-
Method Details
-
getApiKey
-
setApiKey
-
isAuthEnabled
public boolean isAuthEnabled()Returns true if API key authentication is enabled. Authentication is enabled when the API key is set and not empty.
-