diff options
author | Mark Haines <mark.haines@matrix.org> | 2016-09-09 16:29:10 +0100 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2016-09-09 16:33:15 +0100 |
commit | 8aee5aa06807210c17ad0e58e4f237fcf2d052f9 (patch) | |
tree | 2519b7e5fb3358cbd300a0d3dc73f305814fe967 /synapse/rest/client/v2_alpha/thirdparty.py | |
parent | Merge pull request #1092 from matrix-org/erikj/transaction_queue_check (diff) | |
download | synapse-8aee5aa06807210c17ad0e58e4f237fcf2d052f9.tar.xz |
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.
Diffstat (limited to 'synapse/rest/client/v2_alpha/thirdparty.py')
-rw-r--r-- | synapse/rest/client/v2_alpha/thirdparty.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/rest/client/v2_alpha/thirdparty.py b/synapse/rest/client/v2_alpha/thirdparty.py index 4f6f1a7e17..b3e73c0271 100644 --- a/synapse/rest/client/v2_alpha/thirdparty.py +++ b/synapse/rest/client/v2_alpha/thirdparty.py @@ -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 |