matrix_sdk::oidc::requests::revocation

Function revoke_token

Source
pub async fn revoke_token(
    http_service: &BoxCloneSyncService<Request<Bytes>, Response<Bytes>, Box<dyn Error + Send + Sync>>,
    client_credentials: ClientCredentials,
    revocation_endpoint: &Url,
    token: String,
    token_type_hint: Option<OAuthTokenTypeHint>,
    now: DateTime<Utc>,
    rng: &mut impl Rng,
) -> Result<(), TokenRevokeError>
Available on crate feature experimental-oidc only.
Expand description

Revoke a token.

§Arguments

  • http_service - The service to use for making HTTP requests.

  • client_credentials - The credentials obtained when registering the client.

  • revocation_endpoint - The URL of the issuer’s Revocation endpoint.

  • token - The token to revoke.

  • token_type_hint - Hint about the type of the token.

  • now - The current time.

  • rng - A random number generator.

§Errors

Returns an error if the request fails or the response is invalid.