Skip to content

Commit b5c9736

Browse files
committed
Log notice when no entry point is configured
1 parent 23a875c commit b5c9736

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Firewall/ExceptionListener.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,10 @@ private function handleLogoutException(ExceptionEvent $event, LogoutException $e
195195
private function startAuthentication(Request $request, AuthenticationException $authException): Response
196196
{
197197
if (null === $this->authenticationEntryPoint) {
198+
if (null !== $this->logger) {
199+
$this->logger->notice(sprintf('No Authentication entry point configured, returning a %s HTTP response. Configure "entry_point" on the firewall ("{firewall_name}") if you want to modify the response.', Response::HTTP_UNAUTHORIZED), ['firewall_name' => $this->providerKey]);
200+
}
201+
198202
throw new HttpException(Response::HTTP_UNAUTHORIZED, $authException->getMessage(), $authException, [], $authException->getCode());
199203
}
200204

0 commit comments

Comments
 (0)