pub async fn verify_id_token(
token: &str,
jwks_uri: &str,
expected_issuer: &str,
expected_audience: &str,
http: &Client,
) -> Result<VerifiedIdToken>Expand description
Verify an external id_token against the provider’s JWKS.
Fetches the JWKS from the given URI, selects the appropriate key (by kid
if present in the JWT header), and verifies the signature. Returns the
decoded claims on success.
§Arguments
token— The raw JWT string (id_token from the external provider).jwks_uri— The provider’s JWKS endpoint URL.expected_issuer— The expectedissclaim value (provider’s issuer URL).expected_audience— The expectedaudclaim value (client_id).http— HTTP client for fetching the JWKS.