mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-09 15:19:10 +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> |
||
|---|---|---|
| .. | ||
| apps | ||
| cli | ||
| client | ||
| conformance | ||
| contrib | ||
| deprecated | ||
| docs | ||
| experimental | ||
| fs | ||
| integration_tests | ||
| prompts | ||
| resources | ||
| scripts | ||
| server | ||
| telemetry | ||
| tools | ||
| utilities | ||
| __init__.py | ||
| conftest.py | ||
| test_apps.py | ||
| test_apps_prefab.py | ||
| test_compat.py | ||
| test_exceptions.py | ||
| test_fastmcp_app.py | ||
| test_json_schema_generation.py | ||
| test_mcp_config.py | ||
| test_no_legacy_httpx.py | ||
| test_settings.py | ||