pub async fn fetch_oauth2_claims(
http_client: &Client,
userinfo_endpoint: &str,
access_token: &str,
mapping: &ClaimMapping,
) -> Result<Value>Expand description
Fetch the userinfo endpoint and return a normalized synthetic claims object.
The returned serde_json::Value always contains:
"sub"— stable string identifier (coerced from integer if needed)"name"— display name ornull"email"— email address ornull"email_verified"— bool (falsewhen the field is absent or null)
This object is structurally identical to what the OIDC path produces from a verified id_token, so all downstream code (identity mapping, provisioning) is unchanged.