Skip to content

Commit

Permalink
provisioning: allow for cookies to be passed in the 'cookie_header' key
Browse files Browse the repository at this point in the history
Signed-off-by: Sumner Evans <[email protected]>
  • Loading branch information
sumnerevans committed Jan 17, 2024
1 parent ff98455 commit 6368166
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions linkedin_matrix/web/provisioning_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ async def login(self, request: web.Request) -> web.Response:
except json.JSONDecodeError:
return web.HTTPBadRequest(body='{"error": "Malformed JSON"}', headers=self._headers)

if "cookie_header" in data:
for cookie in data.pop("cookie_header").split(" ;"):
key, val = cookie.split("=", 1)
data[key] = val

if "li_at" not in data or "JSESSIONID" not in data:
return web.HTTPBadRequest(body='{"error": "Missing keys"}', headers=self._headers)

Expand Down

0 comments on commit 6368166

Please sign in to comment.