From 1240ed6c6dbeb708535805b4cbfa5d37bf8e4020 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 13 Feb 2023 11:17:03 +0100 Subject: [PATCH] providers/oauth2: fix inconsistency in event client_credentials created events Signed-off-by: Jens Langhammer --- authentik/providers/oauth2/views/token.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/authentik/providers/oauth2/views/token.py b/authentik/providers/oauth2/views/token.py index 360ab2243..fd42a2049 100644 --- a/authentik/providers/oauth2/views/token.py +++ b/authentik/providers/oauth2/views/token.py @@ -383,9 +383,11 @@ class TokenParams: method_args["jwk_id"] = parsed_key.key_id Event.new( action=EventAction.LOGIN, - PLAN_CONTEXT_METHOD="jwt", - PLAN_CONTEXT_METHOD_ARGS=method_args, - PLAN_CONTEXT_APPLICATION=app, + **{ + PLAN_CONTEXT_METHOD: "jwt", + PLAN_CONTEXT_METHOD_ARGS: method_args, + PLAN_CONTEXT_APPLICATION: app, + }, ).from_http(request, user=self.user) def __post_init_device_code(self, request: HttpRequest):