Skip to main content

run_auth_token_refresh

Function run_auth_token_refresh 

Source
pub async fn run_auth_token_refresh<E>(
    http_client: AxHttpClient,
    credential: Credential,
    update_token: impl Fn(String) -> Result<(), E> + Send + 'static,
)
where E: Display + Send + 'static,
Expand description

Runs the AX authentication-token refresh loop.

A refreshed token becomes the HTTP session token during authentication, then update_token makes it available to future WebSocket reconnect handshakes.