diff options
author | Frederick Muriuki Muriithi | 2023-03-09 04:39:37 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2023-03-09 04:39:37 +0300 |
commit | dee42dd14dc7786b1ccf9465bb28dfe74024166c (patch) | |
tree | 31af463e825d03776ac46cd859e65610dfcc5457 /gn3/auth/authorisation | |
parent | a35d16f9a191afbb31e2c185e87e5eec5e23122f (diff) | |
download | genenetwork3-dee42dd14dc7786b1ccf9465bb28dfe74024166c.tar.gz |
auth: introspection: Protect introspection endpoint
The introspection endpoint could contain privileged information, thus requires
that the endpoint be protected. This commit ensures that a user has
authenticated to the system and that the client they are using be one of the
allowed clients.
Diffstat (limited to 'gn3/auth/authorisation')
-rw-r--r-- | gn3/auth/authorisation/errors.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gn3/auth/authorisation/errors.py b/gn3/auth/authorisation/errors.py index ff28cd4..3bc7a04 100644 --- a/gn3/auth/authorisation/errors.py +++ b/gn3/auth/authorisation/errors.py @@ -8,6 +8,10 @@ class AuthorisationError(Exception): """ error_code: int = 400 +class ForbiddenAccess(AuthorisationError): + """Raised for forbidden access.""" + error_code: int = 403 + class UserRegistrationError(AuthorisationError): """Raised whenever a user registration fails""" |