Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/http/httpx/kiota_http/httpx_request_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,10 +564,10 @@ async def retry_cae_response_if_required(
if auth_header_value.casefold().startswith(
self.BEARER_AUTHENTICATION_SCHEME.casefold()
):
claims_match = re.search('claims="(.+)"', auth_header_value)
claims_match = re.search('claims="([^"]+)"', auth_header_value)
if not claims_match:
raise ValueError("Unable to parse claims from response")
response_claims = claims_match.group().split('="')[1]
response_claims = claims_match.group(1)
parent_span.add_event(AUTHENTICATE_CHALLENGED_EVENT_KEY)
parent_span.set_attribute("http.retry_count", 1)
return await self.get_http_response_message(
Expand Down
2 changes: 1 addition & 1 deletion packages/http/httpx/tests/test_httpx_request_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ async def test_retries_on_cae_failure(
{
"claims": (
"eyJhY2Nlc3NfdG9rZW4iOnsibmJmIjp7ImVzc2VudGlhbCI6dHJ1ZSwgInZhbH"
"VlIjoiMTYwNDEwNjY1MSJ9fX0"
"VlIjoiMTYwNDEwNjY1MSJ9fX0="
)
},
),
Expand Down
Loading