summary refs log tree commit diff
path: root/synapse/api/auth.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--synapse/api/auth.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/synapse/api/auth.py b/synapse/api/auth.py
index ca280707c5..c0762df567 100644
--- a/synapse/api/auth.py
+++ b/synapse/api/auth.py
@@ -374,6 +374,21 @@ class Auth(object):
         return True
 
     def _verify_third_party_invite(self, event, auth_events):
+        """
+        Validates that the join event is authorized by a previous third-party invite.
+
+        Checks that the public key, and keyserver, match those in the invite,
+        and that the join event has a signature issued using that public key.
+
+        Args:
+            event: The m.room.member join event being validated.
+            auth_events: All relevant previous context events which may be used
+                for authorization decisions.
+
+        Return:
+            True if the event fulfills the expectations of a previous third party
+            invite event.
+        """
         if not ThirdPartyInvites.join_has_third_party_invite(event.content):
             return False
         join_third_party_invite = event.content["third_party_invite"]