Skip to content

Commit

Permalink
Fixed last deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
korotovsky committed Dec 11, 2015
1 parent 3accdeb commit ddfd70e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\HttpKernel\UriSigner;
use Symfony\Component\Security\Core\Exception\AuthenticationException;
use Symfony\Component\Security\Core\SecurityContextInterface;
use Symfony\Component\Security\Core\Security;
use Symfony\Component\Security\Http\Authentication\DefaultAuthenticationFailureHandler;

/**
Expand Down Expand Up @@ -45,14 +45,14 @@ public function onAuthenticationFailure(Request $request, AuthenticationExceptio
$this->log(sprintf('Forwarding to %s', $this->options['failure_path']));

$subRequest = $this->httpUtils->createRequest($request, $this->options['failure_path']);
$subRequest->attributes->set(SecurityContextInterface::AUTHENTICATION_ERROR, $exception);
$subRequest->attributes->set(Security::AUTHENTICATION_ERROR, $exception);

return $this->httpKernel->handle($subRequest, HttpKernelInterface::SUB_REQUEST);
}

$this->log(sprintf('Redirecting to %s', $this->options['failure_path']));

$request->getSession()->set(SecurityContextInterface::AUTHENTICATION_ERROR, $exception);
$request->getSession()->set(Security::AUTHENTICATION_ERROR, $exception);

$failureUrl = $this->options['failure_path'];
$failureUrl .= strpos($failureUrl, '?') !== false ? '&' : '?';
Expand Down

0 comments on commit ddfd70e

Please sign in to comment.