forked-synapse/synapse/rest/client
Quentin Gliech fe1daad672
Move the "email unsubscribe" resource, refactor the macaroon generator & simplify the access token verification logic. (#12986)
This simplifies the access token verification logic by removing the `rights`
parameter which was only ever used for the unsubscribe link in email
notifications. The latter has been moved under the `/_synapse` namespace,
since it is not a standard API.

This also makes the email verification link more secure, by embedding the
app_id and pushkey in the macaroon and verifying it. This prevents the user
from tampering the query parameters of that unsubscribe link.

Macaroon generation is refactored:

- Centralised all macaroon generation and verification logic to the
  `MacaroonGenerator`
- Moved to `synapse.utils`
- Changed the constructor to require only a `Clock`, hostname, and a secret key
  (instead of a full `Homeserver`).
- Added tests for all methods.
2022-06-14 09:12:08 -04:00
..
__init__.py
_base.py
account_data.py Remove HomeServer.get_datastore() (#12031) 2022-02-23 11:04:02 +00:00
account_validity.py
account.py Remove unstable identifiers for MSC3069. (#12596) 2022-05-03 12:43:12 -04:00
auth.py Use getClientAddress instead of getClientIP. (#12599) 2022-05-04 14:11:21 -04:00
capabilities.py Move experimental support for MSC3440 to /versions. (#12099) 2022-02-28 18:29:09 +00:00
devices.py Consolidate the logic of delete_device/delete_devices. (#12970) 2022-06-07 07:43:35 -04:00
directory.py Remove HomeServer.get_datastore() (#12031) 2022-02-23 11:04:02 +00:00
events.py Remove HomeServer.get_datastore() (#12031) 2022-02-23 11:04:02 +00:00
filter.py
initial_sync.py Remove HomeServer.get_datastore() (#12031) 2022-02-23 11:04:02 +00:00
keys.py Remove HomeServer.get_datastore() (#12031) 2022-02-23 11:04:02 +00:00
knock.py Use ParamSpec in a few places (#12667) 2022-05-09 10:27:39 +00:00
login.py Use getClientAddress instead of getClientIP. (#12599) 2022-05-04 14:11:21 -04:00
logout.py Consolidate the logic of delete_device/delete_devices. (#12970) 2022-06-07 07:43:35 -04:00
mutual_rooms.py Mutual rooms: Remove dependency on user directory (#12836) 2022-05-30 10:05:31 +01:00
notifications.py Implement changes to MSC2285 (hidden read receipts) (#12168) 2022-05-04 11:59:22 -04:00
openid.py Remove HomeServer.get_datastore() (#12031) 2022-02-23 11:04:02 +00:00
password_policy.py
presence.py
profile.py Use direct references for configuration variables (part 6). (#10916) 2021-09-29 06:44:15 -04:00
push_rule.py Add some type hints to datastore (#12717) 2022-05-17 15:29:06 +01:00
pusher.py Move the "email unsubscribe" resource, refactor the macaroon generator & simplify the access token verification logic. (#12986) 2022-06-14 09:12:08 -04:00
read_marker.py Don't error on unknown receipt types (#12670) 2022-05-09 11:09:19 +01:00
receipts.py No longer permit empty body when sending receipts (#12709) 2022-05-11 15:34:17 +00:00
register.py Fix typo in some instances of enable_registration_token_3pid_bypass. (#12639) 2022-05-05 07:11:52 -04:00
relations.py Move the (unstable) dir parameter for /relations behind an experimental flag. (#12984) 2022-06-08 09:00:35 -04:00
report_event.py Remove HomeServer.get_datastore() (#12031) 2022-02-23 11:04:02 +00:00
room_batch.py Room batch: fix up handling of unknown prev_event_ids (#12316) 2022-03-29 14:56:25 +01:00
room_keys.py
room_upgrade_rest_servlet.py
room.py Reduce the amount of state we pull from the DB (#12811) 2022-06-06 09:24:12 +01:00
sendtodevice.py
sync.py Additional constants for EDU types. (#12884) 2022-05-27 07:14:36 -04:00
tags.py Remove HomeServer.get_datastore() (#12031) 2022-02-23 11:04:02 +00:00
thirdparty.py
tokenrefresh.py
transactions.py Use ParamSpec in a few places (#12667) 2022-05-09 10:27:39 +00:00
user_directory.py Correct check_username_for_spam annotations and docs (#12246) 2022-03-18 13:51:41 +00:00
versions.py Use private instead of hidden in MSC2285 related code. (#12635) 2022-05-05 12:31:25 +00:00
voip.py