# LastID SDK Configuration Example
#
# Copy this file to one of these locations:
# - ./lastid.toml (current directory)
# - ~/.config/lastid/config.toml (user config on Linux/macOS)
# - /etc/lastid/config.toml (system-wide on Unix)
#
# Environment variables can override any setting. Supported variables:
# - LASTID_ENDPOINT
# - LASTID_CLIENT_ID
# - LASTID_TRUST_REGISTRY_ENDPOINT
# - LASTID_TIMEOUT
# - LASTID_POLLING_TIMEOUT
# - LASTID_RETRY_MAX_ATTEMPTS
# - LASTID_CACHE_ENABLED
# - LASTID_CACHE_TTL
#
# Environment variable interpolation is supported with ${VAR_NAME} syntax.

# Required: The LastID IDP endpoint
idp_endpoint = "https://human.lastid.co"

# Required: OAuth client ID for your application
# Register your application at the IDP to obtain this value
client_id = "your-client-id"

# Optional: Custom trust registry endpoint
# Defaults to {idp_endpoint}/v1/trust-registry if not set
# trust_registry_endpoint = "https://human.lastid.co/v1/trust-registry"

# Optional: Public base URL for callback URLs
# Useful when generating callback URLs for credential requests
# public_base_url = "https://your-app.example.com"

# HTTP request timeout in seconds
timeout_seconds = 30

# Polling configuration for credential requests
[polling]
# Initial polling interval in milliseconds
initial_interval_ms = 2000

# Maximum polling interval in milliseconds (backoff cap)
max_interval_ms = 30000

# Maximum time to wait for a credential request to complete
max_duration_seconds = 300

# Backoff multiplier for exponential backoff
backoff_multiplier = 1.5

# Retry policy for transient failures
[retry]
# Maximum number of retry attempts
max_attempts = 3

# Initial delay between retries in milliseconds
initial_delay_ms = 1000

# Maximum delay between retries in milliseconds
max_delay_ms = 30000

# Exponential backoff base (e.g., 2.0 means delay doubles each retry)
backoff_base = 2.0

# Trust registry cache configuration
[cache]
# Enable caching of trust registry lookups
enabled = true

# Cache TTL in seconds
ttl_seconds = 60

# Maximum number of cached entries
max_entries = 1000
