-
Notifications
You must be signed in to change notification settings - Fork 119
SG-39106 Cleanup unused RV authentication module #1034
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
SG-39106 Cleanup unused RV authentication module #1034
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR simplifies the authentication module by consolidating the SSO classes into a single SsoSaml2 class, removing redundant modules, and adding a new method to access session data.
- Merged functionality from
SsoSaml2ToolkitandSsoSaml2RvintoSsoSaml2and deleted the old classes. - Updated
login_dialogand related tests to referenceSsoSaml2instead of the removed classes. - Introduced
get_session_datainSsoSaml2to expose session details.
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/authentication_tests/test_web_login.py | Updated import and instantiation from SsoSaml2Toolkit to SsoSaml2. |
| tests/authentication_tests/test_interactive_authentication.py | Adjusted mock patch and comment to target SsoSaml2. |
| python/tank/authentication/sso_saml2/sso_saml2_toolkit.py | Deleted redundant SsoSaml2Toolkit file after merging functionality. |
| python/tank/authentication/sso_saml2/sso_saml2_rv.py | Deleted redundant SsoSaml2Rv file after merging functionality. |
| python/tank/authentication/sso_saml2/sso_saml2.py | Added new get_session_data method to retrieve host, user, session, and cookies. |
| python/tank/authentication/sso_saml2/commit_id | Cleared commit ID file content; may no longer be necessary. |
| python/tank/authentication/sso_saml2/init.py | Removed import of now-deleted SsoSaml2Toolkit. |
| python/tank/authentication/login_dialog.py | Swapped SsoSaml2Toolkit references for SsoSaml2 initialization. |
Comments suppressed due to low confidence (2)
python/tank/authentication/sso_saml2/sso_saml2.py:139
- [nitpick] Add or update unit tests for
get_session_datato verify that host, user_id, session_id, and cookies are correctly returned.
def get_session_data(self):
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1034 +/- ##
==========================================
+ Coverage 79.78% 79.86% +0.07%
==========================================
Files 198 196 -2
Lines 20773 20748 -25
==========================================
- Hits 16574 16570 -4
+ Misses 4199 4178 -21 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-authored-by: Copilot <[email protected]>
This pull request simplifies the authentication module by consolidating the
SsoSaml2ToolkitandSsoSaml2Rvclasses into theSsoSaml2class, removing redundant code, and updating references across the codebase. Additionally, it introduces a new method inSsoSaml2for retrieving session data.Authentication Module Simplification:
python/tank/authentication/login_dialog.py: ReplacedSsoSaml2ToolkitwithSsoSaml2in the import and initialization, removing the dependency on the now-deleted class. [1] [2]python/tank/authentication/sso_saml2/__init__.py: Removed the import ofSsoSaml2Toolkitas the class is no longer needed.python/tank/authentication/sso_saml2/sso_saml2.py: Added theget_session_datamethod to retrieve session details, consolidating functionality previously spread across multiple classes.Code Cleanup:
python/tank/authentication/sso_saml2/sso_saml2_toolkit.pyandpython/tank/authentication/sso_saml2/sso_saml2_rv.py: Deleted these files and their respective classes (SsoSaml2ToolkitandSsoSaml2Rv) as their functionality has been merged intoSsoSaml2. [1] [2]Test Updates:
tests/authentication_tests/test_interactive_authentication.pyandtests/authentication_tests/test_web_login.py: Updated tests to replace references toSsoSaml2ToolkitwithSsoSaml2. This ensures compatibility with the refactored code. [1] [2] [3]