fastmcp/tests/server/auth/providers
Jeremiah Lowin 9c21754a45
Fix Azure provider OIDC scope handling (#2506)
* Fix Azure provider to handle OIDC scopes correctly

OIDC scopes (openid, profile, email, offline_access) were being
incorrectly prefixed with identifier_uri, causing Azure to reject
authorization requests. This fix:

- Detects OIDC scopes and sends them unprefixed to Azure
- Filters OIDC scopes from token validation (Azure doesn't include
  them in access token scp claims)
- Still advertises OIDC scopes to clients via valid_scopes
- Also handles dot-notation scopes (e.g., User.Read) correctly

Fixes #2451, #2420

* Fix dot-notation scopes to be prefixed (custom scopes can have dots)

* Improve Azure scope handling docs with clear examples
2025-12-01 13:42:36 -05:00
..
__init__.py Add WorkOS and Azure OAuth providers (#1550) 2025-08-20 16:22:03 -04:00
test_auth0.py Derive jwt_signing_key from Client Secret, default to Encrypted Disk Store (#2223) 2025-10-24 19:08:58 -04:00
test_aws.py Derive jwt_signing_key from Client Secret, default to Encrypted Disk Store (#2223) 2025-10-24 19:08:58 -04:00
test_azure.py Fix Azure provider OIDC scope handling (#2506) 2025-12-01 13:42:36 -05:00
test_descope.py feat: Made Changes to DescopeProvider to Support New Well Known URLs (#2392) 2025-11-22 12:20:50 -05:00
test_discord.py Add Discord OAuth provider and corresponding tests (#2428) 2025-12-01 12:58:29 -05:00
test_github.py Derive jwt_signing_key from Client Secret, default to Encrypted Disk Store (#2223) 2025-10-24 19:08:58 -04:00
test_google.py Add refresh token support defaults to GoogleProvider 2025-11-17 11:54:00 -05:00
test_introspection.py Add RFC 7662 token introspection provider (#2074) 2025-10-16 10:57:06 -04:00
test_scalekit.py Scalekit provider updates (#2413) 2025-11-22 12:22:13 -05:00
test_supabase.py feat: add algorithm configuration to Supabase auth provider (#2376) 2025-11-05 20:21:10 -05:00
test_workos.py Derive jwt_signing_key from Client Secret, default to Encrypted Disk Store (#2223) 2025-10-24 19:08:58 -04:00