mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-16 13:43:51 +01:00
Briefly doc structure of query_auth API.
This commit is contained in:
parent
b724a809c4
commit
776ac820f9
1 changed files with 18 additions and 0 deletions
|
@ -232,6 +232,24 @@ class FederationServer(object):
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def on_query_auth_request(self, origin, content, event_id):
|
def on_query_auth_request(self, origin, content, event_id):
|
||||||
|
"""
|
||||||
|
Content is a dict with keys::
|
||||||
|
auth_chain (list): A list of events that give the auth chain.
|
||||||
|
missing (list): A list of event_ids indicating what the other
|
||||||
|
side (`origin`) think we're missing.
|
||||||
|
rejects (dict): A mapping from event_id to a 2-tuple of reason
|
||||||
|
string and a proof (or None) of why the event was rejected.
|
||||||
|
The keys of this dict give the list of events the `origin` has
|
||||||
|
rejected.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
origin (str)
|
||||||
|
content (dict)
|
||||||
|
event_id (str)
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
Deferred: Results in `dict` with the same format as `content`
|
||||||
|
"""
|
||||||
auth_chain = [
|
auth_chain = [
|
||||||
(yield self._check_sigs_and_hash(self.event_from_pdu_json(e)))
|
(yield self._check_sigs_and_hash(self.event_from_pdu_json(e)))
|
||||||
for e in content["auth_chain"]
|
for e in content["auth_chain"]
|
||||||
|
|
Loading…
Reference in a new issue