mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
address greptile review feedback (greploop iteration 8)
This commit is contained in:
parent
27f766424d
commit
d8906d33f7
2 changed files with 5 additions and 3 deletions
|
|
@ -2593,7 +2593,7 @@ class SSOAuthenticationHandler:
|
||||||
Returns a combined dict of the token response and user info, suitable
|
Returns a combined dict of the token response and user info, suitable
|
||||||
for passing to a response_convertor.
|
for passing to a response_convertor.
|
||||||
"""
|
"""
|
||||||
verbose_proxy_logger.info(
|
verbose_proxy_logger.debug(
|
||||||
"PKCE: performing direct token exchange (code_verifier length=%d)",
|
"PKCE: performing direct token exchange (code_verifier length=%d)",
|
||||||
len(code_verifier),
|
len(code_verifier),
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -3142,10 +3142,12 @@ class TestPKCEFunctionality:
|
||||||
test_state = "test_oauth_state_123"
|
test_state = "test_oauth_state_123"
|
||||||
mock_request.query_params = {"state": test_state}
|
mock_request.query_params = {"state": test_state}
|
||||||
|
|
||||||
# Mock cache with async methods
|
# Mock cache with async methods — use dict format (primary path)
|
||||||
mock_cache = MagicMock()
|
mock_cache = MagicMock()
|
||||||
test_code_verifier = "test_code_verifier_abc123xyz"
|
test_code_verifier = "test_code_verifier_abc123xyz"
|
||||||
mock_cache.async_get_cache = AsyncMock(return_value=test_code_verifier)
|
mock_cache.async_get_cache = AsyncMock(
|
||||||
|
return_value={"code_verifier": test_code_verifier}
|
||||||
|
)
|
||||||
mock_cache.async_delete_cache = AsyncMock()
|
mock_cache.async_delete_cache = AsyncMock()
|
||||||
|
|
||||||
with patch("litellm.proxy.proxy_server.redis_usage_cache", None), patch("litellm.proxy.proxy_server.user_api_key_cache", mock_cache), patch.dict(os.environ, {"GENERIC_CLIENT_USE_PKCE": "true"}):
|
with patch("litellm.proxy.proxy_server.redis_usage_cache", None), patch("litellm.proxy.proxy_server.user_api_key_cache", mock_cache), patch.dict(os.environ, {"GENERIC_CLIENT_USE_PKCE": "true"}):
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue