-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmetadata.php
More file actions
132 lines (123 loc) · 4.58 KB
/
metadata.php
File metadata and controls
132 lines (123 loc) · 4.58 KB
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
121
122
123
124
125
126
127
128
129
130
131
132
<?php
/**
* Copyright © OXID eSales AG. All rights reserved.
* See LICENSE file for license details.
*/
/**
* Metadata version
*/
use OxidEsales\SecurityModule\Authentication\TwoFactorAuth\Settings\TwoFAShopSettings as TwoFactorAuthModuleSettings;
use OxidEsales\SecurityModule\PasswordPolicy\Service\ModuleSettingsService as PasswordPolicyModuleSettings;
use OxidEsales\SecurityModule\Captcha\Service\ModuleSettingsService as CaptchaModuleSettings;
use OxidEsales\SecurityModule\Core\Module;
$sMetadataVersion = '2.1';
/**
* Module information
*/
$aModule = [
'id' => Module::MODULE_ID,
'title' => 'OXID Security Module',
'description' => [
'en' => 'Tools to protect your shop and safeguard customer accounts.',
'de' => 'Werkzeuge zum Schutz Ihres Shops und zur Sicherung von Kundenkonten.'
],
'thumbnail' => 'logo.png',
'version' => '2.1.0',
'author' => 'OXID eSales AG',
'url' => 'https://github.com/OXID-eSales/security-module',
'email' => 'info@oxid-esales.com',
'extend' => [
\OxidEsales\Eshop\Application\Component\UserComponent::class => \OxidEsales\SecurityModule\Captcha\Shop\UserComponent::class,
\OxidEsales\Eshop\Application\Controller\NewsletterController::class => \OxidEsales\SecurityModule\Captcha\Shop\NewsletterController::class,
\OxidEsales\Eshop\Application\Controller\ForgotPasswordController::class => \OxidEsales\SecurityModule\Shared\Controller\ForgotPasswordController::class,
\OxidEsales\Eshop\Application\Model\User::class => \OxidEsales\SecurityModule\Shared\Model\User::class,
\OxidEsales\Eshop\Core\InputValidator::class => \OxidEsales\SecurityModule\Shared\Core\InputValidator::class,
\OxidEsales\Eshop\Core\ViewConfig::class => \OxidEsales\SecurityModule\Shared\Core\ViewConfig::class
],
'controllers' => [
'captcha' => \OxidEsales\SecurityModule\Captcha\Controller\CaptchaController::class,
'password' => \OxidEsales\SecurityModule\PasswordPolicy\Controller\PasswordAjaxController::class,
],
'templates' => [
],
'events' => [
],
'blocks' => [
],
'settings' => [
//Password policy enable
[
'group' => 'password_policy',
'name' => PasswordPolicyModuleSettings::PASSWORD_POLICY_ENABLE,
'type' => 'bool',
'value' => true
],
//Password length requirements
[
'group' => 'password_policy',
'name' => PasswordPolicyModuleSettings::PASSWORD_MINIMUM_LENGTH,
'type' => 'num',
'value' => 8
],
//Password symbols requirements
[
'group' => 'password_policy',
'name' => PasswordPolicyModuleSettings::PASSWORD_UPPERCASE,
'type' => 'bool',
'value' => true
],
[
'group' => 'password_policy',
'name' => PasswordPolicyModuleSettings::PASSWORD_LOWERCASE,
'type' => 'bool',
'value' => true
],
[
'group' => 'password_policy',
'name' => PasswordPolicyModuleSettings::PASSWORD_DIGIT,
'type' => 'bool',
'value' => true
],
[
'group' => 'password_policy',
'name' => PasswordPolicyModuleSettings::PASSWORD_SPECIAL_CHAR,
'type' => 'bool',
'value' => true
],
//Captcha
[
'group' => 'captcha',
'name' => CaptchaModuleSettings::CAPTCHA_ENABLE,
'type' => 'bool',
'value' => true
],
[
'group' => 'captcha',
'name' => CaptchaModuleSettings::HONEYPOT_CAPTCHA_ENABLE,
'type' => 'bool',
'value' => true
],
[
'group' => 'captcha',
'name' => CaptchaModuleSettings::CAPTCHA_LIFETIME,
'type' => 'select',
'constraints' => '5min|15min|30min',
'value' => '15min'
],
//TwoFactorAuth settings
[
'group' => 'two_factor_auth',
'name' => TwoFactorAuthModuleSettings::ACTIVE,
'type' => 'bool',
'value' => false
],
[
//todo-high: should be moved to the user settings (near by 2FA turning on switch)
'group' => 'two_factor_auth',
'name' => TwoFactorAuthModuleSettings::TWO_FACTOR_TYPE,
'type' => 'select',
'constraints' => 'otp',
'value' => 'otp'
],
],
];