@@ -671,7 +671,8 @@ def register_device(
671
671
def record_user_external_id (
672
672
self , auth_provider_id : str , remote_user_id : str , registered_user_id : str
673
673
) -> defer .Deferred :
674
- """Record a mapping from an external user id to a mxid
674
+ """Record a mapping between an external user id from a single sign-on provider
675
+ and a mxid.
675
676
676
677
Added in Synapse v1.9.0.
677
678
@@ -1286,6 +1287,30 @@ async def check_username(self, username: str) -> None:
1286
1287
"""
1287
1288
await self ._registration_handler .check_username (username )
1288
1289
1290
+ async def store_remote_3pid_association (
1291
+ self , user_id : str , medium : str , address : str , id_server : str
1292
+ ) -> None :
1293
+ """Stores an existing association between a user ID and a third-party identifier.
1294
+
1295
+ The association must already exist on the remote identity server.
1296
+
1297
+ Added in Synapse v1.56.0.
1298
+
1299
+ Args:
1300
+ user_id: The user ID that's been associated with the 3PID.
1301
+ medium: The medium of the 3PID (current supported values are "msisdn" and
1302
+ "email").
1303
+ address: The address of the 3PID.
1304
+ id_server: The identity server the 3PID association has been registered on.
1305
+ This should only be the domain (or IP address, optionally with the port
1306
+ number) for the identity server. This will be used to reach out to the
1307
+ identity server using HTTPS (unless specified otherwise by Synapse's
1308
+ configuration) when attempting to unbind the third-party identifier.
1309
+
1310
+
1311
+ """
1312
+ await self ._store .add_user_bound_threepid (user_id , medium , address , id_server )
1313
+
1289
1314
1290
1315
class PublicRoomListManager :
1291
1316
"""Contains methods for adding to, removing from and querying whether a room
0 commit comments