Skip to content
Draft
Show file tree
Hide file tree
Changes from 3 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 python/tank/authentication/login_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
from . import site_info
from .sso_saml2 import (
SsoSaml2IncompletePySide2,
SsoSaml2Toolkit,
SsoSaml2,
SsoSaml2MissingQtModuleError,
)

Expand Down Expand Up @@ -153,7 +153,7 @@ def __init__(
"QtWebEngineWidgets": QtWebEngineWidgets,
}
try:
self._sso_saml2 = SsoSaml2Toolkit(
self._sso_saml2 = SsoSaml2(
"Flow Production Tracking Web Login", qt_modules=qt_modules
)
except SsoSaml2MissingQtModuleError as e:
Expand Down
2 changes: 0 additions & 2 deletions python/tank/authentication/sso_saml2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
# Classes
from .sso_saml2 import SsoSaml2 # noqa

from .sso_saml2_toolkit import SsoSaml2Toolkit # noqa

# Functions
from .utils import ( # noqa
get_saml_claims_expiration,
Expand Down
1 change: 0 additions & 1 deletion python/tank/authentication/sso_saml2/commit_id

This file was deleted.

13 changes: 13 additions & 0 deletions python/tank/authentication/sso_saml2/sso_saml2.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,16 @@
:returns: The session error string or ""
"""
return self._core._session.error

def get_session_data(self):
"""
Get a mimimal subset of session data, for the Shotgun Toolkit.
Comment thread
julien-lang marked this conversation as resolved.
Outdated

:returns: A tuple of the hostname, user_id, session_id and cookies.
"""
return (

Check warning on line 145 in python/tank/authentication/sso_saml2/sso_saml2.py

View check run for this annotation

Codecov / codecov/patch

python/tank/authentication/sso_saml2/sso_saml2.py#L145

Added line #L145 was not covered by tests
self._core._session.host,
self._core._session.user_id,
self._core._session.session_id,
self._core._session.cookies,
)
82 changes: 0 additions & 82 deletions python/tank/authentication/sso_saml2/sso_saml2_rv.py

This file was deleted.

36 changes: 0 additions & 36 deletions python/tank/authentication/sso_saml2/sso_saml2_toolkit.py

This file was deleted.

4 changes: 2 additions & 2 deletions tests/authentication_tests/test_interactive_authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ def done(self, r):
self.my_result = r
return super(MyLoginDialog, self).done(r)

# Patch out the SsoSaml2Toolkit class to avoid threads being created, which cause
# Patch out the SsoSaml2 class to avoid threads being created, which cause
# issues with tests.
with mock.patch("tank.authentication.login_dialog.SsoSaml2Toolkit"):
with mock.patch("tank.authentication.login_dialog.SsoSaml2"):
with contextlib.closing(MyLoginDialog(is_session_renewal, **kwargs)) as ld:
try:
self._prepare_window(ld)
Expand Down
4 changes: 2 additions & 2 deletions tests/authentication_tests/test_web_login.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
skip_if_pyside_missing,
)

from tank.authentication.sso_saml2 import SsoSaml2Toolkit
from tank.authentication.sso_saml2 import SsoSaml2


@only_run_on_nix # This test issues a seg-fault on Windows
Expand All @@ -36,7 +36,7 @@ def test_web_login(self):
if qt_abstraction.QtGui.QApplication.instance() is None:
self._app = qt_abstraction.QtGui.QApplication([])

obj = SsoSaml2Toolkit(
obj = SsoSaml2(
"Test Web Login",
qt_modules={
"QtCore": qt_abstraction.QtCore,
Expand Down
Loading