From fec6de1ba21e327d950550e4bbee53b9e6ed5c45 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 13 Dec 2021 22:49:42 +0100 Subject: [PATCH] providers/oauth2: add additional logging to show with token path is taken Signed-off-by: Jens Langhammer --- authentik/providers/oauth2/views/token.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/authentik/providers/oauth2/views/token.py b/authentik/providers/oauth2/views/token.py index bd0e0d094..936ce1c0e 100644 --- a/authentik/providers/oauth2/views/token.py +++ b/authentik/providers/oauth2/views/token.py @@ -194,8 +194,10 @@ class TokenView(View): self.params = TokenParams.parse(request, self.provider, client_id, client_secret) if self.params.grant_type == GRANT_TYPE_AUTHORIZATION_CODE: + LOGGER.info("Converting authorization code to refresh token") return TokenResponse(self.create_code_response()) if self.params.grant_type == GRANT_TYPE_REFRESH_TOKEN: + LOGGER.info("Refreshing refresh token") return TokenResponse(self.create_refresh_response()) raise ValueError(f"Invalid grant_type: {self.params.grant_type}") except TokenError as error: