mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-27 07:50:43 +02:00
* Add subject field to AccessToken initialization Fixes #4266 Add `subject` property to the AccessToken. ```python return AccessToken( token=access_token_as_dict["token"], client_id=access_token_as_dict["client_id"], scopes=access_token_as_dict["scopes"], subject=access_token_as_dict["subject"], # Optional fields expires_at=access_token_as_dict.get("expires_at"), resource=access_token_as_dict.get("resource"), claims=access_token_as_dict.get("claims") or {}, ) ``` * Populate AccessToken.subject across all token verifiers Closes #4266. get_access_token().subject was always None: the SDK's AccessToken.subject wasn't carried into FastMCP's AccessToken by the dependency-layer conversion, and none of the built-in TokenVerifiers (JWT, introspection, and the OAuth-provider verifiers for Discord, Clerk, Google, WorkOS, HuggingFace, GitHub, and Cognito) populated it from the sub claim/field they already extract. --------- Co-authored-by: Jeremiah Lowin <153965+jlowin@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_auth0.py | ||
| test_auth0_mcp.py | ||
| test_aws.py | ||
| test_azure.py | ||
| test_azure_scopes.py | ||
| test_clerk.py | ||
| test_debug.py | ||
| test_descope.py | ||
| test_discord.py | ||
| test_github.py | ||
| test_google.py | ||
| test_http_client.py | ||
| test_huggingface.py | ||
| test_introspection.py | ||
| test_keycloak.py | ||
| test_oci.py | ||
| test_propelauth.py | ||
| test_scalekit.py | ||
| test_supabase.py | ||
| test_workos.py | ||