fix: log authorization denials on the auth channel

This commit is contained in:
fromme committed 2026-11-13 16:21:04 +01:00
1 parent aebfc2ca9b
commit 46934e278c
1 file changed
+3 -3
@@ -39,7 +39,7 @@ class AuthorizationCodeListener
private readonly UrlGeneratorInterface $urlGenerator,
private readonly RequestStack $requestStack,
private readonly Security $security,
private readonly LoggerInterface $authenticationLogger,
private readonly LoggerInterface $authLogger,
private readonly Environment $twig,
) {
}
@@ -62,7 +62,7 @@ class AuthorizationCodeListener
Response::HTTP_TEMPORARY_REDIRECT
);
$event->setResponse($response);
$this->authenticationLogger->info('Authorization request without session');
$this->authLogger->info('Authorization request without session');
return;
}
@@ -126,7 +126,7 @@ class AuthorizationCodeListener
array $required,
string $reason,
): void {
$this->authenticationLogger->info('Authorization request denied', [
$this->authLogger->info('Authorization request denied', [
'client' => $client,
'user_id' => $user->getId(),
'required_roles' => $required,