Symfony\Component\HttpKernel\Security\Firewall\ExceptionListener::startAuthentication PHP Method

startAuthentication() protected method

protected startAuthentication ( Request $request, Symfony\Component\Security\Exception\AuthenticationException $reason )
$request Symfony\Component\HttpFoundation\Request
$reason Symfony\Component\Security\Exception\AuthenticationException
    protected function startAuthentication(Request $request, AuthenticationException $reason)
    {
        $this->context->setToken(null);

        if (null === $this->authenticationEntryPoint) {
            throw $reason;
        }

        if (null !== $this->logger) {
            $this->logger->debug('Calling Authentication entry point');
        }

        $request->getSession()->set('_security.target_url', $request->getUri());

        return $this->authenticationEntryPoint->start($request, $reason);
    }