Issues (193)

src/Security/DevAuthenticator.php (5 issues)

1
<?php
2
3
namespace CodeCloud\Bundle\ShopifyBundle\Security;
4
5
use Symfony\Component\HttpFoundation\Request;
6
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
0 ignored issues
show
The type Symfony\Component\Securi...on\Token\TokenInterface was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
7
use Symfony\Component\Security\Core\Exception\AuthenticationException;
0 ignored issues
show
The type Symfony\Component\Securi...AuthenticationException was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
8
use Symfony\Component\Security\Core\User\UserInterface;
0 ignored issues
show
The type Symfony\Component\Security\Core\User\UserInterface was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
9
use Symfony\Component\Security\Core\User\UserProviderInterface;
0 ignored issues
show
The type Symfony\Component\Securi...r\UserProviderInterface was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
10
use Symfony\Component\Security\Guard\AbstractGuardAuthenticator;
0 ignored issues
show
The type Symfony\Component\Securi...tractGuardAuthenticator was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
11
12
class DevAuthenticator extends AbstractGuardAuthenticator
13
{
14
    /**
15
     * @var string
16
     */
17
    private $storeName;
18
19
    /**
20
     * @param string $storeName
21
     */
22
    public function __construct($storeName)
23
    {
24
        $this->storeName = $storeName;
25
    }
26
27
    public function getCredentials(Request $request)
28
    {
29
        return [
30
            'shop' => $this->storeName,
31
        ];
32
    }
33
34
    public function getUser($credentials, UserProviderInterface $userProvider)
35
    {
36
        return $userProvider->loadUserByUsername($credentials['shop']);
37
    }
38
39
    public function checkCredentials($credentials, UserInterface $user)
40
    {
41
        return true;
42
    }
43
44
    public function onAuthenticationFailure(Request $request, AuthenticationException $exception)
45
    {
46
    }
47
48
    public function onAuthenticationSuccess(Request $request, TokenInterface $token, $providerKey)
49
    {
50
    }
51
52
    public function supportsRememberMe()
53
    {
54
        return false;
55
    }
56
57
    public function start(Request $request, AuthenticationException $authException = null)
58
    {
59
    }
60
}
61