|
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
|
|
|
|