synapse-product/synapse
Richard van der Hoff 0a4001eba1
Clean up exception handling for access_tokens (#5656)
First of all, let's get rid of `TOKEN_NOT_FOUND_HTTP_STATUS`. It was a hack we
did at one point when it was possible to return either a 403 or a 401 if the
creds were missing. We always return a 401 in these cases now (thankfully), so
it's not needed.

Let's also stop abusing `AuthError` for these cases. Honestly they have nothing
that relates them to the other places that `AuthError` is used, other than the
fact that they are loosely under the 'Auth' banner. It makes no sense for them
to share exception classes.

Instead, let's add a couple of new exception classes: `InvalidClientTokenError`
and `MissingClientTokenError`, for the `M_UNKNOWN_TOKEN` and `M_MISSING_TOKEN`
cases respectively - and an `InvalidClientCredentialsError` base class for the
two of them.
2019-07-11 11:06:23 +01:00
..
_scripts Run Black. (#5482) 2019-06-20 19:32:02 +10:00
api Clean up exception handling for access_tokens (#5656) 2019-07-11 11:06:23 +01:00
app Add basic opentracing support (#5544) 2019-07-11 10:36:03 +01:00
appservice Move logging utilities out of the side drawer of util/ and into logging/ (#5606) 2019-07-04 00:07:04 +10:00
config Add basic opentracing support (#5544) 2019-07-11 10:36:03 +01:00
crypto Move logging utilities out of the side drawer of util/ and into logging/ (#5606) 2019-07-04 00:07:04 +10:00
events Add origin_server_ts and sender fields to m.replace (#5613) 2019-07-05 17:20:02 +01:00
federation Add basic opentracing support (#5544) 2019-07-11 10:36:03 +01:00
groups Move logging utilities out of the side drawer of util/ and into logging/ (#5606) 2019-07-04 00:07:04 +10:00
handlers Inline issue_access_token (#5659) 2019-07-11 04:10:07 +10:00
http Add basic opentracing support (#5544) 2019-07-11 10:36:03 +01:00
logging Add basic opentracing support (#5544) 2019-07-11 10:36:03 +01:00
metrics Move logging utilities out of the side drawer of util/ and into logging/ (#5606) 2019-07-04 00:07:04 +10:00
module_api Remove access-token support from RegistrationHandler.register (#5641) 2019-07-08 19:01:08 +01:00
push Add default push rule to ignore reactions (#5623) 2019-07-05 17:37:52 +01:00
replication Remove access-token support from RegistrationHandler.register (#5641) 2019-07-08 19:01:08 +01:00
res/templates Change password reset links to /_matrix. 2019-06-11 11:34:33 +01:00
rest Clean up exception handling for access_tokens (#5656) 2019-07-11 11:06:23 +01:00
server_notices Run Black. (#5482) 2019-06-20 19:32:02 +10:00
state Move logging utilities out of the side drawer of util/ and into logging/ (#5606) 2019-07-04 00:07:04 +10:00
static Revert redundant changes to static js 2019-06-26 22:46:23 +01:00
storage Remove access-token support from RegistrationStore.register (#5642) 2019-07-10 16:26:49 +01:00
streams Fix /messages on workers when no from param specified. 2019-06-24 10:06:51 +01:00
util Fixes to the federation rate limiter (#5621) 2019-07-05 11:10:19 +01:00
__init__.py 1.1.0 2019-07-04 11:44:09 +01:00
event_auth.py Run Black. (#5482) 2019-06-20 19:32:02 +10:00
notifier.py Move logging utilities out of the side drawer of util/ and into logging/ (#5606) 2019-07-04 00:07:04 +10:00
python_dependencies.py Add basic opentracing support (#5544) 2019-07-11 10:36:03 +01:00
secrets.py Run Black. (#5482) 2019-06-20 19:32:02 +10:00
server.py cleanups 2019-06-27 00:37:41 +01:00
server.pyi Run Black. (#5482) 2019-06-20 19:32:02 +10:00
types.py Run Black. (#5482) 2019-06-20 19:32:02 +10:00
visibility.py Run Black. (#5482) 2019-06-20 19:32:02 +10:00