Passed
Branch master (98ecdf)
by Michael
56:56
created

onAuthenticationFailure()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 2
crap 2
1
<?php
2
3
/*
4
 * This file is part of the OsLabSecurityApiBundle package.
5
 *
6
 * (c) OsLab <https://github.com/OsLab>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace OsLab\SecurityApiBundle\Security\Authentication;
13
14
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
15
use Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface;
16
use Symfony\Component\Security\Core\Exception\AuthenticationException;
17
use Symfony\Component\HttpFoundation\Request;
18
19
/**
20
 * Class AuthenticationFailureHandler
21
 *
22
 * @author Michael COULLERET <[email protected]>
23
 * @author Florent DESPIERRES <[email protected]>
24
 */
25
class AuthenticationFailureHandler implements AuthenticationFailureHandlerInterface
26
{
27
    /**
28
     * {@inheritdoc}
29
     */
30
    public function onAuthenticationFailure(Request $request, AuthenticationException $exception)
31
    {
32
        throw new AccessDeniedHttpException($exception);
33
    }
34
}
35