mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-05 03:54:58 -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
|
@ -301,6 +301,8 @@ class DeviceHandler(DeviceWorkerHandler):
|
|||
user_id: str,
|
||||
device_id: Optional[str],
|
||||
initial_device_display_name: Optional[str] = None,
|
||||
auth_provider_id: Optional[str] = None,
|
||||
auth_provider_session_id: Optional[str] = None,
|
||||
) -> str:
|
||||
"""
|
||||
If the given device has not been registered, register it with the
|
||||
|
@ -312,6 +314,8 @@ class DeviceHandler(DeviceWorkerHandler):
|
|||
user_id: @user:id
|
||||
device_id: device id supplied by client
|
||||
initial_device_display_name: device display name from client
|
||||
auth_provider_id: The SSO IdP the user used, if any.
|
||||
auth_provider_session_id: The session ID (sid) got from the SSO IdP.
|
||||
Returns:
|
||||
device id (generated if none was supplied)
|
||||
"""
|
||||
|
@ -323,6 +327,8 @@ class DeviceHandler(DeviceWorkerHandler):
|
|||
user_id=user_id,
|
||||
device_id=device_id,
|
||||
initial_device_display_name=initial_device_display_name,
|
||||
auth_provider_id=auth_provider_id,
|
||||
auth_provider_session_id=auth_provider_session_id,
|
||||
)
|
||||
if new_device:
|
||||
await self.notify_device_update(user_id, [device_id])
|
||||
|
@ -337,6 +343,8 @@ class DeviceHandler(DeviceWorkerHandler):
|
|||
user_id=user_id,
|
||||
device_id=new_device_id,
|
||||
initial_device_display_name=initial_device_display_name,
|
||||
auth_provider_id=auth_provider_id,
|
||||
auth_provider_session_id=auth_provider_session_id,
|
||||
)
|
||||
if new_device:
|
||||
await self.notify_device_update(user_id, [new_device_id])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue