nat.authentication.api_key.api_key_auth_provider_config#

Attributes#

Classes#

APIKeyAuthProviderConfig

API Key authentication configuration model.

Module Contents#

logger#
HEADER_NAME_REGEX#
class APIKeyAuthProviderConfig#

Bases: nat.data_models.authentication.AuthProviderBaseConfig

API Key authentication configuration model.

raw_key: nat.data_models.common.SerializableSecretStr = None#
auth_scheme: nat.data_models.authentication.HeaderAuthScheme = None#
custom_header_name: str | None = None#
custom_header_prefix: str | None = None#
classmethod validate_raw_key(
value: nat.data_models.common.SerializableSecretStr,
) nat.data_models.common.SerializableSecretStr#
classmethod validate_custom_header_name(value: str | None) str | None#
classmethod validate_custom_header_prefix(value: str | None) str | None#
classmethod validate_raw_key_after(value: str) str#
validate_custom_scheme_requirements() APIKeyAuthProviderConfig#

Validate that custom_header_name and custom_header_prefix are provided when using CUSTOM scheme.