Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maunium
synapse
Commits
776ac820
Commit
776ac820
authored
10 years ago
by
Erik Johnston
Browse files
Options
Downloads
Patches
Plain Diff
Briefly doc structure of query_auth API.
parent
b724a809
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synapse/federation/federation_server.py
+18
-0
18 additions, 0 deletions
synapse/federation/federation_server.py
with
18 additions
and
0 deletions
synapse/federation/federation_server.py
+
18
−
0
View file @
776ac820
...
@@ -232,6 +232,24 @@ class FederationServer(object):
...
@@ -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
"
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment