Skip to main content

fetch_m2m_token

Function fetch_m2m_token 

Source
async fn fetch_m2m_token(
    agent_id: &str,
    client_id: &str,
    client_secret: &str,
    token_endpoint: &str,
    mstore: &Arc<Store>,
    http: &Client,
) -> Result<String, CredentialFailure>
Expand description

Fetches a fresh client_credentials access token and caches it. client_credentials tokens carry no refresh token — expiry just means re-fetching from scratch with the (already-provisioned) client secret.