for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the OsLabSecurityApiBundle package.
*
* (c) OsLab <https://github.com/OsLab>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace OsLab\SecurityApiBundle\Security\Authentication;
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
use Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface;
use Symfony\Component\Security\Core\Exception\AuthenticationException;
use Symfony\Component\HttpFoundation\Request;
/**
* Class AuthenticationFailureHandler
* @author Michael COULLERET <[email protected]>
* @author Florent DESPIERRES <[email protected]>
class AuthenticationFailureHandler implements AuthenticationFailureHandlerInterface
{
* {@inheritdoc}
public function onAuthenticationFailure(Request $request, AuthenticationException $exception)
throw new AccessDeniedHttpException($exception);
}