Implement handling of new cookie received from SU platform#722
Implement handling of new cookie received from SU platform#722MattyTheHacker merged 6 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request implements automatic handling of cookie updates from the SU platform. The MSL platform returns updated authentication cookies in HTTP responses that expire approximately every 15 minutes. The PR refactors cookie management to detect and store these updated cookies, and consolidates duplicate HTTP session handling code.
Changes:
- Introduced
fetch_url_content_with_sessionfunction to handle HTTP requests with automatic cookie update detection and storage - Refactored
fetch_community_group_members_listto use the new shared session handling function - Removed duplicate HTTP session code from
CheckSUPlatformAuthorisationBaseCogclass
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| utils/msl/memberships.py | Added fetch_url_content_with_session function to detect and update cookies from server responses; refactored fetch_community_group_members_list to use new function |
| utils/msl/init.py | Exported new fetch_url_content_with_session function |
| cogs/check_su_platform_authorisation.py | Removed duplicate HTTP session handling code; replaced with calls to shared fetch_url_content_with_session function |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Matty Widdop <18513864+MattyTheHacker@users.noreply.github.com>
Note this will need the cookie checking task (or some other query) to run more often than the cookie expires. For MSL this appears to be about 15 minutes