Skip to main content

fetch_client_metadata

Function fetch_client_metadata 

Source
pub async fn fetch_client_metadata(
    state: &OAuthState,
    client_id_url: &str,
) -> Result<(RegisteredClient, Option<Duration>), String>
Expand description

Fetch and validate a Client ID Metadata Document from an HTTPS URL.

Returns (client, max_age_from_cache_control); the latter is passed to CimdCache::clamp_ttl by the caller. Callers should usually go through resolve_cimd_client instead, which handles caching.