anonymousland-synapse/tests
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
..
api Clean up exception handling for access_tokens (#5656) 2019-07-11 11:06:23 +01:00
app Run Black on the tests again (#5170) 2019-05-10 00:12:11 -05: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 Fixes to the federation rate limiter (#5621) 2019-07-05 11:10:19 +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 Run Black. (#5482) 2019-06-20 19:32:02 +10:00
federation Run Black. (#5482) 2019-06-20 19:32:02 +10:00
handlers Remove access-token support from RegistrationStore.register (#5642) 2019-07-10 16:26:49 +01:00
http Move logging utilities out of the side drawer of util/ and into logging/ (#5606) 2019-07-04 00:07:04 +10:00
push Move logging utilities out of the side drawer of util/ and into logging/ (#5606) 2019-07-04 00:07:04 +10:00
replication Run Black on the tests again (#5170) 2019-05-10 00:12:11 -05:00
rest Include the original event in /relations (#5626) 2019-07-09 13:43:08 +01:00
scripts Port register_new_matrix_user to Python 3 and add tests (#4085) 2018-10-26 22:05:22 +11:00
server_notices Run Black. (#5482) 2019-06-20 19:32:02 +10:00
state Run Black. (#5482) 2019-06-20 19:32:02 +10:00
storage Remove access-token support from RegistrationStore.register (#5642) 2019-07-10 16:26:49 +01:00
test_utils Move logging utilities out of the side drawer of util/ and into logging/ (#5606) 2019-07-04 00:07:04 +10:00
util Fixes to the federation rate limiter (#5621) 2019-07-05 11:10:19 +01:00
__init__.py Unify v1 and v2 REST client APIs (#5226) 2019-06-03 21:28:59 +10:00
patch_inline_callbacks.py Move logging utilities out of the side drawer of util/ and into logging/ (#5606) 2019-07-04 00:07:04 +10:00
server.py Run Black. (#5482) 2019-06-20 19:32:02 +10:00
test_distributor.py Run black. 2018-08-10 23:54:09 +10:00
test_event_auth.py Run Black on the tests again (#5170) 2019-05-10 00:12:11 -05:00
test_federation.py Move logging utilities out of the side drawer of util/ and into logging/ (#5606) 2019-07-04 00:07:04 +10:00
test_mau.py Run Black on the tests again (#5170) 2019-05-10 00:12:11 -05:00
test_metrics.py Run Black on the tests again (#5170) 2019-05-10 00:12:11 -05:00
test_preview.py Run Black. (#5482) 2019-06-20 19:32:02 +10:00
test_server.py Move logging utilities out of the side drawer of util/ and into logging/ (#5606) 2019-07-04 00:07:04 +10:00
test_state.py Run Black. (#5482) 2019-06-20 19:32:02 +10:00
test_terms_auth.py Terms might not be the last stage 2019-05-13 16:10:26 +01:00
test_test_utils.py Run black. 2018-08-10 23:54:09 +10:00
test_types.py Run Black. (#5482) 2019-06-20 19:32:02 +10:00
test_visibility.py Run Black. (#5482) 2019-06-20 19:32:02 +10:00
unittest.py Move logging utilities out of the side drawer of util/ and into logging/ (#5606) 2019-07-04 00:07:04 +10:00
utils.py Fixes to the federation rate limiter (#5621) 2019-07-05 11:10:19 +01:00