feat(server): Add support for custom OIDC scopes and permissions via JWTs

This commit is contained in:
Chris Coutinho
2025-10-23 08:37:36 +02:00
parent 3ebc468a09
commit e48f5f3f30
13 changed files with 447 additions and 110 deletions
-3
View File
@@ -38,7 +38,6 @@ def decode_jwt_without_verification(token: str) -> dict:
@pytest.mark.integration
@pytest.mark.asyncio
async def test_jwt_token_structure_with_custom_client():
"""
Test that we can create a JWT-enabled OAuth client and examine the token structure.
@@ -76,7 +75,6 @@ async def test_jwt_token_structure_with_custom_client():
@pytest.mark.integration
@pytest.mark.asyncio
async def test_opaque_token_vs_jwt_comparison():
"""
Compare opaque tokens vs JWT tokens to understand the differences.
@@ -165,7 +163,6 @@ async def test_opaque_token_vs_jwt_comparison():
@pytest.mark.integration
@pytest.mark.asyncio
async def test_scope_presence_in_jwt():
"""
Verify that custom scopes (nc:read, nc:write) are present in JWT tokens.
+1 -1
View File
@@ -27,7 +27,7 @@ async def test_prm_endpoint():
assert prm_data["resource"] == "http://127.0.0.1:8001"
assert "nc:read" in prm_data["scopes_supported"]
assert "nc:write" in prm_data["scopes_supported"]
assert "http://app:80" in prm_data["authorization_servers"]
assert "http://127.0.0.1:8080" in prm_data["authorization_servers"]
assert "header" in prm_data["bearer_methods_supported"]
assert "RS256" in prm_data["resource_signing_alg_values_supported"]