Skip to content

Commit

Permalink
Log notice when no entry point is configured
Browse files Browse the repository at this point in the history
  • Loading branch information
wouterj committed Sep 17, 2020
1 parent 23a875c commit b5c9736
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Firewall/ExceptionListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@ private function handleLogoutException(ExceptionEvent $event, LogoutException $e
private function startAuthentication(Request $request, AuthenticationException $authException): Response
{
if (null === $this->authenticationEntryPoint) {
if (null !== $this->logger) {
$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]);
}

throw new HttpException(Response::HTTP_UNAUTHORIZED, $authException->getMessage(), $authException, [], $authException->getCode());
}

Expand Down

0 comments on commit b5c9736

Please sign in to comment.