aboutsummaryrefslogtreecommitdiff
path: root/gn3/app.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-01-04 11:20:30 +0300
committerFrederick Muriuki Muriithi2023-01-04 11:20:30 +0300
commit3752c663fa9ded1801680aa2342947b7676d8ce9 (patch)
tree6e221e5b003a634e585833cfe19a8d73aee1f36c /gn3/app.py
parent7ea2f83c505c792a36d17cc0fc13301a885fb732 (diff)
downloadgenenetwork3-3752c663fa9ded1801680aa2342947b7676d8ce9.tar.gz
auth: Add `/register-user` endpoint
* gn3/app.py: register top-level error handlers. reorganise oauth2 blueprint. * gn3/auth/__init__.py: reorganise oaut2 blueprint. * gn3/auth/authentication/oauth2/views.py: reorganise oauth2 blueprint. * gn3/auth/authorisation/exceptions.py -> gn3/auth/authorisation/errors.py * gn3/auth/authorisation/groups.py: rename file/module * gn3/auth/authorisation/resources.py: rename file/module * gn3/auth/authorisation/views.py: Add `/register-user` endpoint * gn3/auth/blueprint.py: reorganise oauth2 blueprint. * gn3/errors.py: register top-level error handlers.
Diffstat (limited to 'gn3/app.py')
-rw-r--r--gn3/app.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/gn3/app.py b/gn3/app.py
index cf88b2e..72d76c2 100644
--- a/gn3/app.py
+++ b/gn3/app.py
@@ -15,11 +15,12 @@ from gn3.api.correlation import correlation
from gn3.api.data_entry import data_entry
from gn3.api.wgcna import wgcna
from gn3.api.ctl import ctl
+from gn3.errors import register_error_handlers
from gn3.api.async_commands import async_commands
from gn3.api.menu import menu
from gn3.api.search import search
from gn3.api.metadata import metadata
-from gn3.auth.authorisation.views import oauth2
+from gn3.auth import oauth2
from gn3.auth.authentication.oauth2.server import setup_oauth2_server
@@ -60,5 +61,6 @@ def create_app(config: Union[Dict, str, None] = None) -> Flask:
app.register_blueprint(metadata, url_prefix="/api/metadata")
app.register_blueprint(oauth2, url_prefix="/api/oauth2")
+ register_error_handlers(app)
setup_oauth2_server(app)
return app