Skip to content

Commit 42a453d

Browse files
authored
Merge pull request #105 from speakeasy-sdks/fix/python-mypy-errors
update simplecookie usage
2 parents 86b9f52 + f3242c2 commit 42a453d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/clerk_backend_api/jwks_helpers/authenticaterequest.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,10 @@ def get_session_token(request: Requestish) -> Optional[str]:
9393
cookie_header = request.headers.get('cookie')
9494
if cookie_header is not None:
9595
if cookie_header is not None:
96-
for key, value in SimpleCookie(cookie_header).items():
96+
cookies = SimpleCookie(cookie_header)
97+
for key in cookies.keys():
9798
if key.startswith("__session"):
98-
return value
99+
return cookies[key].value
99100

100101
return None
101102

0 commit comments

Comments
 (0)