Completed
Push — master ( aa6f89...863f7f )
by John
08:07
created

NoopProvider::authenticate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php declare(strict_types = 1);
2
/*
3
 * This file is part of the KleijnWeb\SwaggerBundle package.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 */
8
namespace KleijnWeb\SwaggerBundle\Security;
9
10
use Symfony\Component\Security\Core\Authentication\Provider\AuthenticationProviderInterface;
11
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
12
13
/**
14
 * Patchwork to make the security extension work
15
 *
16
 * @author John Kleijn <[email protected]>
17
 */
18
class NoopProvider implements AuthenticationProviderInterface
19
{
20
    /**
21
     * {@inheritdoc}
22
     *
23
     * @throws \BadMethodCallException
24
     */
25
    public function authenticate(TokenInterface $token)
26
    {
27
        throw new \BadMethodCallException("Unsupported");
28
    }
29
30
    /**
31
     * {@inheritdoc}
32
     */
33
    public function supports(TokenInterface $token)
34
    {
35
        return false;
36
    }
37
}
38