mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 14:24:55 -04:00
Save the OIDC session ID (sid) with the device on login (#11482)
As a step towards allowing back-channel logout for OIDC.
This commit is contained in:
parent
8b4b153c9e
commit
a15a893df8
15 changed files with 370 additions and 65 deletions
|
@ -130,7 +130,13 @@ class SamlHandlerTestCase(HomeserverTestCase):
|
|||
|
||||
# check that the auth handler got called as expected
|
||||
auth_handler.complete_sso_login.assert_called_once_with(
|
||||
"@test_user:test", "saml", request, "redirect_uri", None, new_user=True
|
||||
"@test_user:test",
|
||||
"saml",
|
||||
request,
|
||||
"redirect_uri",
|
||||
None,
|
||||
new_user=True,
|
||||
auth_provider_session_id=None,
|
||||
)
|
||||
|
||||
@override_config({"saml2_config": {"grandfathered_mxid_source_attribute": "mxid"}})
|
||||
|
@ -156,7 +162,13 @@ class SamlHandlerTestCase(HomeserverTestCase):
|
|||
|
||||
# check that the auth handler got called as expected
|
||||
auth_handler.complete_sso_login.assert_called_once_with(
|
||||
"@test_user:test", "saml", request, "", None, new_user=False
|
||||
"@test_user:test",
|
||||
"saml",
|
||||
request,
|
||||
"",
|
||||
None,
|
||||
new_user=False,
|
||||
auth_provider_session_id=None,
|
||||
)
|
||||
|
||||
# Subsequent calls should map to the same mxid.
|
||||
|
@ -165,7 +177,13 @@ class SamlHandlerTestCase(HomeserverTestCase):
|
|||
self.handler._handle_authn_response(request, saml_response, "")
|
||||
)
|
||||
auth_handler.complete_sso_login.assert_called_once_with(
|
||||
"@test_user:test", "saml", request, "", None, new_user=False
|
||||
"@test_user:test",
|
||||
"saml",
|
||||
request,
|
||||
"",
|
||||
None,
|
||||
new_user=False,
|
||||
auth_provider_session_id=None,
|
||||
)
|
||||
|
||||
def test_map_saml_response_to_invalid_localpart(self):
|
||||
|
@ -213,7 +231,13 @@ class SamlHandlerTestCase(HomeserverTestCase):
|
|||
|
||||
# test_user is already taken, so test_user1 gets registered instead.
|
||||
auth_handler.complete_sso_login.assert_called_once_with(
|
||||
"@test_user1:test", "saml", request, "", None, new_user=True
|
||||
"@test_user1:test",
|
||||
"saml",
|
||||
request,
|
||||
"",
|
||||
None,
|
||||
new_user=True,
|
||||
auth_provider_session_id=None,
|
||||
)
|
||||
auth_handler.complete_sso_login.reset_mock()
|
||||
|
||||
|
@ -309,7 +333,13 @@ class SamlHandlerTestCase(HomeserverTestCase):
|
|||
|
||||
# check that the auth handler got called as expected
|
||||
auth_handler.complete_sso_login.assert_called_once_with(
|
||||
"@test_user:test", "saml", request, "redirect_uri", None, new_user=True
|
||||
"@test_user:test",
|
||||
"saml",
|
||||
request,
|
||||
"redirect_uri",
|
||||
None,
|
||||
new_user=True,
|
||||
auth_provider_session_id=None,
|
||||
)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue