Skip to main content

fetch_token

Function fetch_token 

Source
async fn fetch_token(
    federated_token_file: &Path,
    exchange: &Arc<dyn Fn(String, Vec<String>) -> BoxFuture<'static, Result<AccessToken>> + Send + Sync>,
    scopes: Vec<String>,
) -> Result<AccessToken>
Expand description

Reads the projected service account token file and exchanges its contents for an AAD access token.