# API Key authentication configuration fragment
# Conditional: when auth_method == "api_key"

[[elements]]
type = "text"
name = "api_key_header_name"
prompt = "API key header name"
help = "HTTP header name for API key (e.g., 'X-API-Key', 'Authorization')"
default = "X-API-Key"
nickel_path = ["provisioning", "security", "auth", "api_key", "header_name"]
required = true
when = "auth_method == api_key"

[[elements]]
type = "text"
name = "api_key_query_param"
prompt = "API key query parameter (optional)"
help = "Query parameter name for API key (e.g., 'api_key'). Leave empty to disable."
placeholder = "api_key"
nickel_path = ["provisioning", "security", "auth", "api_key", "query_param"]
required = false
when = "auth_method == api_key"

[[elements]]
type = "section_header"
name = "api_key_note"
title = "ℹ️ API Keys Configuration"
border_top = true
border_bottom = true
help = "API keys will need to be manually configured in the generated config file"
when = "auth_method == api_key"
