aboutsummaryrefslogtreecommitdiff
path: root/gn3/oauth2/errors.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-08-01 14:48:55 -0500
committerFrederick Muriuki Muriithi2024-08-01 14:59:23 -0500
commit2d1c546ac9f4707cb30d1a3dbfea6b80c5c2cc89 (patch)
tree0106f21af4f159df2dfccf79c8bf0abfbd3fdea4 /gn3/oauth2/errors.py
parent4b2e9f3fb3383421d7a55df5399aab71e0cc3b4f (diff)
downloadgenenetwork3-2d1c546ac9f4707cb30d1a3dbfea6b80c5c2cc89.tar.gz
Add `gn3.oauth2` module to handle authorisations
Add the `gn3.oauth2` which will handle the authorisations. It is intended to eventually replace the `gn3.auth` module which is a left over from when the authorisation server was part of GN3.
Diffstat (limited to 'gn3/oauth2/errors.py')
-rw-r--r--gn3/oauth2/errors.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/gn3/oauth2/errors.py b/gn3/oauth2/errors.py
new file mode 100644
index 0000000..f8cfd2c
--- /dev/null
+++ b/gn3/oauth2/errors.py
@@ -0,0 +1,8 @@
+"""List of possible errors."""
+
+class AuthorisationError(Exception):
+ """Top-level error class dealing with generic authorisation errors."""
+
+
+class TokenValidationError(AuthorisationError):
+ """Class to indicate that token validation failed."""