matrix_sdk::oidc::requests::introspection

Function introspect_token

Source
pub async fn introspect_token(
    http_service: &BoxCloneSyncService<Request<Bytes>, Response<Bytes>, Box<dyn Error + Send + Sync>>,
    authentication: IntrospectionAuthentication<'_>,
    introspection_endpoint: &Url,
    token: String,
    token_type_hint: Option<OAuthTokenTypeHint>,
    now: DateTime<Utc>,
    rng: &mut impl Rng,
) -> Result<IntrospectionResponse, IntrospectionError>
Available on crate feature experimental-oidc only.
Expand description

Obtain information about a token.

§Arguments

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

  • authentication - The method used to authenticate the request.

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

  • token - The token to introspect.

  • 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.