pub async fn resolve_token_source() -> Result<Box<dyn TokenSource>>Expand description
Pick the token source based on configuration.
Preference order:
- If
OMNIGRAPH_SERVER_BEARER_TOKENS_AWS_SECRETis set AND the binary was built with--features aws, returns an AWS Secrets Manager source. - If that env var is set but the binary was built without the feature, errors with a clear rebuild instruction rather than silently falling back to the env/file source (which would hide the misconfiguration).
- Otherwise, returns
EnvOrFileTokenSource.