Skip to content

Commit 8e57fe4

Browse files
committed
Update tests for client_secret=None behavior
1 parent 6c895ae commit 8e57fe4

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

tests/server/auth/test_oauth_proxy.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,8 @@ async def test_register_client(self, oauth_proxy):
420420
stored = await oauth_proxy.get_client("original-client")
421421
assert stored is not None
422422
assert stored.client_id == "original-client"
423-
assert stored.client_secret == "original-secret"
423+
# Proxy uses token_endpoint_auth_method="none", so client_secret is not stored
424+
assert stored.client_secret is None
424425

425426
async def test_get_registered_client(self, oauth_proxy):
426427
"""Test retrieving a registered client."""

tests/server/auth/test_oauth_proxy_storage.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ async def test_register_and_get_client(self, jwt_verifier, temp_storage):
7575
client = await proxy.get_client("test-client-123")
7676
assert client is not None
7777
assert client.client_id == "test-client-123"
78-
assert client.client_secret == "secret-456"
78+
# Proxy uses token_endpoint_auth_method="none", so client_secret is not stored
79+
assert client.client_secret is None
7980
assert client.scope == "read write"
8081

8182
async def test_client_persists_across_proxy_instances(
@@ -96,7 +97,8 @@ async def test_client_persists_across_proxy_instances(
9697
proxy2 = self.create_proxy(jwt_verifier, storage=temp_storage)
9798
client = await proxy2.get_client("persistent-client")
9899
assert client is not None
99-
assert client.client_secret == "persistent-secret"
100+
# Proxy uses token_endpoint_auth_method="none", so client_secret is not stored
101+
assert client.client_secret is None
100102
assert client.scope == "openid profile"
101103

102104
async def test_nonexistent_client_returns_none(
@@ -199,7 +201,7 @@ async def test_storage_data_structure(self, jwt_verifier, temp_storage):
199201
"software_id": None,
200202
"software_version": None,
201203
"client_id": "structured-client",
202-
"client_secret": "secret",
204+
"client_secret": None,
203205
"client_id_issued_at": None,
204206
"client_secret_expires_at": None,
205207
"allowed_redirect_uri_patterns": None,

0 commit comments

Comments
 (0)