Issues (9)

src/Symfony/HmacFactory.php (1 issue)

1
<?php
2
3
namespace Acquia\Hmac\Symfony;
4
5
use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\SecurityFactoryInterface;
6
use Symfony\Component\DependencyInjection\ChildDefinition;
7
use Symfony\Component\DependencyInjection\ContainerBuilder;
8
use Symfony\Component\Config\Definition\Builder\NodeDefinition;
9
10
/**
11
 * Class HmacFactory
12
 *
13
 * Provides implementation of authentication provider and listener for Symfony.
14
 */
15
class HmacFactory implements SecurityFactoryInterface
0 ignored issues
show
Deprecated Code introduced by
The interface Symfony\Bundle\SecurityB...ecurityFactoryInterface has been deprecated: since Symfony 5.3, use AuthenticatorFactoryInterface instead. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

15
class HmacFactory implements /** @scrutinizer ignore-deprecated */ SecurityFactoryInterface

This interface has been deprecated. The supplier of the interface has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the interface will be removed and what other interface to use instead.

Loading history...
16
{
17
    /**
18
     * {@inheritdoc}
19
     */
20
    public function create(ContainerBuilder $container, $id, $config, $userProvider, $defaultEntryPoint)
21
    {
22
        $providerId = 'security.authentication.provider.hmac.' . $id;
23
        $container->setDefinition($providerId, new ChildDefinition('hmac.security.authentication.provider'));
24
25
        $listenerId = 'security.authentication.listener.hmac.' . $id;
26
        $container->setDefinition($listenerId, new ChildDefinition('hmac.security.authentication.listener'));
27
28
        return [$providerId, $listenerId, $defaultEntryPoint];
29
    }
30
31
    /**
32
     * {@inheritdoc}
33
     */
34
    public function getPosition()
35
    {
36
        return 'pre_auth';
37
    }
38
39
    /**
40
     * {@inheritdoc}
41
     */
42
    public function getKey()
43
    {
44
        return 'hmac_auth';
45
    }
46
47
    /**
48
     * {@inheritdoc}
49
     */
50
    public function addConfiguration(NodeDefinition $node)
51
    {
52
    }
53
}
54