Skip to main content

token_credential

Function token_credential 

Source
fn token_credential() -> Arc<dyn TokenCredential> ⓘ
Expand description

Returns the token credential to use when the blob URL carries no SAS token.

Prefers RefreshingWorkloadIdentityCredential when its environment variables are present, because the workload identity credential in azure_identity can hold a stale rotated token file. Otherwise falls back to the ChainedCredential::default_chain, whose credential types (e.g. managed identity via IMDS) refresh correctly.