Class ApiKeyProperties

java.lang.Object
dev.dokimos.server.config.ApiKeyProperties

@Component @ConfigurationProperties(prefix="dokimos") public class ApiKeyProperties extends Object
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 Details

    • ApiKeyProperties

      public ApiKeyProperties()
  • Method Details

    • getApiKey

      public String getApiKey()
    • setApiKey

      public void setApiKey(String apiKey)
    • isAuthEnabled

      public boolean isAuthEnabled()
      Returns true if API key authentication is enabled. Authentication is enabled when the API key is set and not empty.