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)
    • getEncryptionKey

      public String getEncryptionKey()
      Returns the master key used to encrypt inline connection API keys at rest, or null when unset. Required only when at least one connection stores an inline key.
    • setEncryptionKey

      public void setEncryptionKey(String encryptionKey)
    • isAuthEnabled

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