diff options
author | Frederick Muriuki Muriithi | 2023-05-29 11:21:48 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2023-05-29 11:21:48 +0300 |
commit | 25c6da03e1639895f0051e8be6502762beefde0b (patch) | |
tree | 3355d9538c550753b6b5f45f37446c0f1e584011 /gn3/auth/authentication | |
parent | a448329fac4ca3c3c42dd180e3bc823024bbd25c (diff) | |
download | genenetwork3-25c6da03e1639895f0051e8be6502762beefde0b.tar.gz |
Enable Administrator login on GN3
* gn3/auth/authentication/oauth2/views.py: Remove endpoint
* gn3/auth/authorisation/users/admin/__init__.py: New admin module
* gn3/auth/authorisation/users/admin/ui.py: New admin module
* gn3/auth/authorisation/users/admin/views.py: New admin module
* gn3/auth/views.py: Use new admin module
* gn3/errors.py: Fix linting errors
* gn3/templates/login.html: New html template
* main.py: Fix linting errors
Diffstat (limited to 'gn3/auth/authentication')
-rw-r--r-- | gn3/auth/authentication/oauth2/views.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/gn3/auth/authentication/oauth2/views.py b/gn3/auth/authentication/oauth2/views.py index f281295..7ce45fd 100644 --- a/gn3/auth/authentication/oauth2/views.py +++ b/gn3/auth/authentication/oauth2/views.py @@ -26,11 +26,6 @@ from ..users import valid_login, NotFoundError, user_by_email auth = Blueprint("auth", __name__) -@auth.route("/register-client", methods=["GET", "POST"]) -def register_client(): - """Register an OAuth2 client.""" - return "WOULD REGISTER ..." - @auth.route("/delete-client/<uuid:client_id>", methods=["GET", "POST"]) def delete_client(client_id: uuid.UUID): """Delete an OAuth2 client.""" @@ -77,8 +72,8 @@ def authorise(): return with_db_connection(__authorise__) except InvalidClientError as ice: - return render_template( - "oauth2/oauth2_error.html", error=ice), ice.status_code + return render_template( + "oauth2/oauth2_error.html", error=ice), ice.status_code @auth.route("/token", methods=["POST"]) def token(): |