/
di.xml
120 lines (113 loc) · 7.21 KB
/
di.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<?xml version="1.0"?>
<!--
/**
* MageSpecialist
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to info@magespecialist.it so we can send you a copy immediately.
*
* @category MSP
* @package MSP_TwoFactorAuth
* @copyright Copyright (c) 2017 Skeeller srl (http://www.magespecialist.it)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<preference for="MSP\TwoFactorAuth\Api\TfaInterface" type="MSP\TwoFactorAuth\Model\Tfa"/>
<preference for="MSP\TwoFactorAuth\Api\UserConfigManagerInterface"
type="MSP\TwoFactorAuth\Model\UserConfigManager"/>
<preference for="MSP\TwoFactorAuth\Api\TrustedManagerInterface" type="MSP\TwoFactorAuth\Model\TrustedManager"/>
<preference for="MSP\TwoFactorAuth\Api\TfaSessionInterface" type="MSP\TwoFactorAuth\Model\TfaSession"/>
<type name="Magento\Framework\Console\CommandList">
<arguments>
<argument name="commands" xsi:type="array">
<item name="msp_twofactorauth_disable" xsi:type="object">MSP\TwoFactorAuth\Command\TfaDisable</item>
<item name="msp_twofactorauth_reset" xsi:type="object">MSP\TwoFactorAuth\Command\TfaReset</item>
</argument>
</arguments>
</type>
<type name="MSP\TwoFactorAuth\Api\TfaInterface">
<arguments>
<argument name="providers" xsi:type="array">
<!-- Parameter "name" must be the same as defined in virtualType "code" parameter -->
<item name="google" xsi:type="object">MSP\TwoFactorAuth\Model\Provider\Google</item>
<item name="duo_security" xsi:type="object">MSP\TwoFactorAuth\Model\Provider\DuoSecurity</item>
<item name="authy" xsi:type="object">MSP\TwoFactorAuth\Model\Provider\Authy</item>
<item name="u2fkey" xsi:type="object">MSP\TwoFactorAuth\Model\Provider\U2fKey</item>
</argument>
</arguments>
</type>
<virtualType name="MSP\TwoFactorAuth\Model\Provider\Google" type="MSP\TwoFactorAuth\Model\Provider">
<arguments>
<argument name="engine" xsi:type="object">MSP\TwoFactorAuth\Model\Provider\Engine\Google</argument>
<argument name="code" xsi:type="string">google</argument>
<argument name="name" xsi:type="string">Google Authenticator</argument>
<argument name="icon" xsi:type="string">MSP_TwoFactorAuth::images/providers/google.png</argument>
<argument name="configureAction" xsi:type="string">msp_twofactorauth/google/configure</argument>
<argument name="authAction" xsi:type="string">msp_twofactorauth/google/auth</argument>
<argument name="extraActions" xsi:type="array">
<item name="qr" xsi:type="string">msp_twofactorauth/google/qr</item>
<item name="configurepost" xsi:type="string">msp_twofactorauth/google/configurepost</item>
<item name="authpost" xsi:type="string">msp_twofactorauth/google/authpost</item>
</argument>
<argument name="canReset" xsi:type="boolean">true</argument>
</arguments>
</virtualType>
<virtualType name="MSP\TwoFactorAuth\Model\Provider\DuoSecurity" type="MSP\TwoFactorAuth\Model\Provider">
<arguments>
<argument name="engine" xsi:type="object">MSP\TwoFactorAuth\Model\Provider\Engine\DuoSecurity</argument>
<argument name="code" xsi:type="string">duo_security</argument>
<argument name="name" xsi:type="string">Duo Security</argument>
<argument name="icon" xsi:type="string">MSP_TwoFactorAuth::images/providers/duo_security.png</argument>
<argument name="configureAction" xsi:type="string">msp_twofactorauth/duo/configure</argument>
<argument name="authAction" xsi:type="string">msp_twofactorauth/duo/auth</argument>
<argument name="extraActions" xsi:type="array">
<item name="authpost" xsi:type="string">msp_twofactorauth/duo/authpost</item>
</argument>
<argument name="canReset" xsi:type="boolean">false</argument>
</arguments>
</virtualType>
<virtualType name="MSP\TwoFactorAuth\Model\Provider\Authy" type="MSP\TwoFactorAuth\Model\Provider">
<arguments>
<argument name="engine" xsi:type="object">MSP\TwoFactorAuth\Model\Provider\Engine\Authy</argument>
<argument name="code" xsi:type="string">authy</argument>
<argument name="name" xsi:type="string">Authy</argument>
<argument name="icon" xsi:type="string">MSP_TwoFactorAuth::images/providers/authy.png</argument>
<argument name="configureAction" xsi:type="string">msp_twofactorauth/authy/configure</argument>
<argument name="authAction" xsi:type="string">msp_twofactorauth/authy/auth</argument>
<argument name="extraActions" xsi:type="array">
<item name="configurepost" xsi:type="string">msp_twofactorauth/authy/configurepost</item>
<item name="verify" xsi:type="string">msp_twofactorauth/authy/verify</item>
<item name="verifypost" xsi:type="string">msp_twofactorauth/authy/verifypost</item>
<item name="authpost" xsi:type="string">msp_twofactorauth/authy/authpost</item>
<item name="token" xsi:type="string">msp_twofactorauth/authy/token</item>
<item name="onetouch" xsi:type="string">msp_twofactorauth/authy/onetouch</item>
<item name="verifyonetouch" xsi:type="string">msp_twofactorauth/authy/verifyonetouch</item>
</argument>
<argument name="canReset" xsi:type="boolean">true</argument>
</arguments>
</virtualType>
<virtualType name="MSP\TwoFactorAuth\Model\Provider\U2fKey" type="MSP\TwoFactorAuth\Model\Provider">
<arguments>
<argument name="engine" xsi:type="object">MSP\TwoFactorAuth\Model\Provider\Engine\U2fKey</argument>
<argument name="code" xsi:type="string">u2fkey</argument>
<argument name="name" xsi:type="string">U2F (Yubikey and others)</argument>
<argument name="icon" xsi:type="string">MSP_TwoFactorAuth::images/providers/u2fkey.png</argument>
<argument name="configureAction" xsi:type="string">msp_twofactorauth/u2f/configure</argument>
<argument name="authAction" xsi:type="string">msp_twofactorauth/u2f/auth</argument>
<argument name="extraActions" xsi:type="array">
<item name="configurepost" xsi:type="string">msp_twofactorauth/u2f/configurepost</item>
<item name="authpost" xsi:type="string">msp_twofactorauth/u2f/authpost</item>
</argument>
<argument name="canReset" xsi:type="boolean">true</argument>
</arguments>
</virtualType>
</config>