pub async fn provider_with_prefix(
prefix: &str,
) -> Result<Option<Arc<dyn AuthProvider>>, Error>Expand description
Initializes auth providers using env vars scoped to a prefix.
For prefix "MICROMEGAS_INGESTION":
- API keys: tries
MICROMEGAS_INGESTION_API_KEYS, falls back toMICROMEGAS_API_KEYS - OIDC: tries
MICROMEGAS_INGESTION_OIDC_CONFIG, falls back toMICROMEGAS_OIDC_CONFIG - Admins: tries
MICROMEGAS_INGESTION_ADMINS, falls back toMICROMEGAS_ADMINS
With an empty prefix the behaviour is identical to provider.