Passed
Push — master ( 69de9a...408b4b )
by Olha
05:11
created

MultiFactorAuthDependencyProvider   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
eloc 11
dl 0
loc 41
rs 10
c 1
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getPostLoginMultiFactorAuthenticationPlugins() 0 6 1
A getCustomerSendStrategyPlugins() 0 4 1
A getUserMultiFactorAuthPlugins() 0 4 1
A getUserSendStrategyPlugins() 0 4 1
1
<?php
2
3
/**
4
 * This file is part of the Spryker Commerce OS.
5
 * For full license information, please view the LICENSE file that was distributed with this source code.
6
 */
7
8
declare(strict_types = 1);
9
10
namespace Pyz\Zed\MultiFactorAuth;
11
12
use Spryker\Zed\AgentSecurityMerchantPortalGui\Communication\Plugin\MultiFactorAuth\PostAgentMerchantUserLoginMultiFactorAuthenticationPlugin;
13
use Spryker\Zed\MultiFactorAuth\Communication\Plugin\Factors\Email\UserEmailMultiFactorAuthPlugin;
14
use Spryker\Zed\MultiFactorAuth\Communication\Plugin\Sender\Customer\CustomerEmailCodeSenderStrategyPlugin;
15
use Spryker\Zed\MultiFactorAuth\Communication\Plugin\Sender\User\UserEmailCodeSenderStrategyPlugin;
16
use Spryker\Zed\MultiFactorAuth\MultiFactorAuthDependencyProvider as SprykerMultiFactorAuthDependencyProvider;
17
use Spryker\Zed\SecurityGui\Communication\Plugin\MultiFactorAuth\PostUserLoginMultiFactorAuthenticationPlugin;
18
use Spryker\Zed\SecurityMerchantPortalGui\Communication\Plugin\MultiFactorAuth\PostMerchantUserLoginMultiFactorAuthenticationPlugin;
19
20
class MultiFactorAuthDependencyProvider extends SprykerMultiFactorAuthDependencyProvider
21
{
22
    /**
23
     * @return array<\Spryker\Shared\MultiFactorAuthExtension\Dependency\Plugin\MultiFactorAuthPluginInterface>
24
     */
25
    protected function getUserMultiFactorAuthPlugins(): array
26
    {
27
        return [
28
            new UserEmailMultiFactorAuthPlugin(),
29
        ];
30
    }
31
32
    /**
33
     * @return array<\Spryker\Shared\MultiFactorAuthExtension\Dependency\Plugin\SendStrategyPluginInterface>
34
     */
35
    protected function getCustomerSendStrategyPlugins(): array
36
    {
37
        return [
38
            new CustomerEmailCodeSenderStrategyPlugin(),
39
        ];
40
    }
41
42
    /**
43
     * @return array<\Spryker\Shared\MultiFactorAuthExtension\Dependency\Plugin\SendStrategyPluginInterface>
44
     */
45
    protected function getUserSendStrategyPlugins(): array
46
    {
47
        return [
48
            new UserEmailCodeSenderStrategyPlugin(),
49
        ];
50
    }
51
52
    /**
53
     * @return array<\Spryker\Shared\MultiFactorAuthExtension\Dependency\Plugin\PostLoginMultiFactorAuthenticationPluginInterface>
54
     */
55
    protected function getPostLoginMultiFactorAuthenticationPlugins(): array
56
    {
57
        return [
58
            new PostUserLoginMultiFactorAuthenticationPlugin(),
59
            new PostMerchantUserLoginMultiFactorAuthenticationPlugin(),
60
            new PostAgentMerchantUserLoginMultiFactorAuthenticationPlugin(),
61
        ];
62
    }
63
}
64