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

AuthenticationFailureHandler   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 10
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A onAuthenticationFailure() 0 4 1
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