mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 11:16:07 -04:00
sign_request -> build_auth_headers (#4408)
Just got very confused about the fact that the headers are only an output, not an input.
This commit is contained in:
parent
3982a6ee07
commit
9feb5d0b71
3 changed files with 18 additions and 15 deletions
|
@ -167,18 +167,21 @@ class IdentityHandler(BaseHandler):
|
|||
"mxid": mxid,
|
||||
"threepid": threepid,
|
||||
}
|
||||
headers = {}
|
||||
|
||||
# we abuse the federation http client to sign the request, but we have to send it
|
||||
# using the normal http client since we don't want the SRV lookup and want normal
|
||||
# 'browser-like' HTTPS.
|
||||
self.federation_http_client.sign_request(
|
||||
auth_headers = self.federation_http_client.build_auth_headers(
|
||||
destination=None,
|
||||
method='POST',
|
||||
url_bytes='/_matrix/identity/api/v1/3pid/unbind'.encode('ascii'),
|
||||
headers_dict=headers,
|
||||
content=content,
|
||||
destination_is=id_server,
|
||||
)
|
||||
headers = {
|
||||
b"Authorization": auth_headers,
|
||||
}
|
||||
|
||||
try:
|
||||
yield self.http_client.post_json_get_json(
|
||||
url,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue