summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorDaniel Wagner-Hall <daniel@matrix.org>2015-10-13 17:18:24 +0100
committerDaniel Wagner-Hall <daniel@matrix.org>2015-10-13 17:18:24 +0100
commit95e53ac53576de2980e8f7683b59f4fa7fce038b (patch)
tree10e798af4db6d7528ef256448441df8844b697f8 /synapse
parentMove event contents into third_party_layout field (diff)
downloadsynapse-95e53ac53576de2980e8f7683b59f4fa7fce038b.tar.xz
Add some docstring
Diffstat (limited to 'synapse')
-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"]