From fe4b2d1a34942d33dc30abfe24ed8ac4ea5d12a5 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 8 Feb 2021 11:51:38 +0100 Subject: [PATCH] providers/oauth2: add authorized scopes to AUTHORIZE_APPLICATION event --- authentik/providers/oauth2/views/authorize.py | 1 + web/src/pages/events/EventInfo.ts | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/authentik/providers/oauth2/views/authorize.py b/authentik/providers/oauth2/views/authorize.py index c5dbda69e..7393ee6bc 100644 --- a/authentik/providers/oauth2/views/authorize.py +++ b/authentik/providers/oauth2/views/authorize.py @@ -253,6 +253,7 @@ class OAuthFulfillmentStage(StageView): EventAction.AUTHORIZE_APPLICATION, authorized_application=application, flow=self.executor.plan.flow_pk, + scopes=", ".join(self.params.scope), ).from_http(self.request) return redirect(self.create_response_uri()) except (ClientIdError, RedirectUriError) as error: diff --git a/web/src/pages/events/EventInfo.ts b/web/src/pages/events/EventInfo.ts index 2a1f73c22..a92c97efe 100644 --- a/web/src/pages/events/EventInfo.ts +++ b/web/src/pages/events/EventInfo.ts @@ -65,13 +65,13 @@ export class EventInfo extends LitElement { case "model_updated": case "model_deleted": return html` -

${gettext("Affected model:")}


+

${gettext("Affected model:")}

${this.getModelInfo(this.event.context.model as EventContext)} `; case "authorize_application": return html`
-

${gettext("Authorized application:")}


+

${gettext("Authorized application:")}

${this.getModelInfo(this.event.context.authorized_application as EventContext)}
@@ -83,14 +83,15 @@ export class EventInfo extends LitElement { }), html``)}
-
`; + + ${this.defaultResponse()}`; case "login_failed": return html`

${gettext(`Attempted to log in as ${this.event.context.username}`)}

${this.defaultResponse()}`; case "token_view": return html` -

${gettext("Token:")}


+

${gettext("Token:")}

${this.getModelInfo(this.event.context.token as EventContext)}`; case "property_mapping_exception": return html`