From 157bf65635cfa1684f15fae4c281ea95e474f8c4 Mon Sep 17 00:00:00 2001 From: TuxCoder Date: Wed, 13 May 2020 20:08:55 +0200 Subject: [PATCH] print more infos to the user while oauth authorize --- lenticular_cloud/views/oidc.py | 4 +++- templates/frontend/oidc_authentication.html.j2 | 10 +++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lenticular_cloud/views/oidc.py b/lenticular_cloud/views/oidc.py index 4bc97d4..f7ed097 100644 --- a/lenticular_cloud/views/oidc.py +++ b/lenticular_cloud/views/oidc.py @@ -33,7 +33,9 @@ def registration_endpoint(): @login_required def authentication_endpoint_confirm(): form = OidcAuthenticationConfirm() - return render_template('frontend/oidc_authentication.html.j2', form=form) + auth_req = current_app.provider.parse_authentication_request(urlencode(flask.request.args), + flask.request.args) + return render_template('frontend/oidc_authentication.html.j2', form=form, auth_req=auth_req) @oidc_provider_views.route('/authentication', methods=['POST']) diff --git a/templates/frontend/oidc_authentication.html.j2 b/templates/frontend/oidc_authentication.html.j2 index c2853be..ff91c64 100644 --- a/templates/frontend/oidc_authentication.html.j2 +++ b/templates/frontend/oidc_authentication.html.j2 @@ -6,9 +6,13 @@

- A service ask for access to your account data.
- - You can confirm this pressing "Continue" + A service ask for access to your account data.
+

+

+ Requested Scopes: {{ auth_req['scope'] }} +

+

+ You can confirm this pressing "Continue"

{{ render_form(form) }}