mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-11-18 22:52:07 -05:00
Add helper function for getting access_tokens from requests
Rather than reimplementing the token parsing in the various places. This will make it easier to change the token parsing to allow access_tokens in HTTP headers.
This commit is contained in:
parent
685da5a3b0
commit
8aee5aa068
6 changed files with 67 additions and 27 deletions
|
|
@ -57,7 +57,7 @@ class ThirdPartyUserServlet(RestServlet):
|
|||
yield self.auth.get_user_by_req(request)
|
||||
|
||||
fields = request.args
|
||||
del fields["access_token"]
|
||||
fields.pop("access_token", None)
|
||||
|
||||
results = yield self.appservice_handler.query_3pe(
|
||||
ThirdPartyEntityKind.USER, protocol, fields
|
||||
|
|
@ -81,7 +81,7 @@ class ThirdPartyLocationServlet(RestServlet):
|
|||
yield self.auth.get_user_by_req(request)
|
||||
|
||||
fields = request.args
|
||||
del fields["access_token"]
|
||||
fields.pop("access_token", None)
|
||||
|
||||
results = yield self.appservice_handler.query_3pe(
|
||||
ThirdPartyEntityKind.LOCATION, protocol, fields
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue