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
|
|
|
namespace Pyz\Yves\CustomerPage; |
9
|
|
|
|
10
|
|
|
use SprykerShop\Yves\CustomerPage\CustomerPageConfig as SprykerCustomerPageConfig; |
11
|
|
|
|
12
|
|
|
class CustomerPageConfig extends SprykerCustomerPageConfig |
13
|
|
|
{ |
14
|
|
|
/** |
15
|
|
|
* @var bool |
16
|
|
|
*/ |
17
|
|
|
protected const CUSTOMER_SECURITY_BLOCKER_ENABLED = true; |
18
|
|
|
|
19
|
|
|
/** |
20
|
|
|
* @var string |
21
|
|
|
*/ |
22
|
|
|
protected const LOGIN_FAILURE_REDIRECT_URL = '/login'; |
23
|
|
|
|
24
|
|
|
/** |
25
|
|
|
* @uses \Pyz\Zed\Customer\CustomerConfig::MIN_LENGTH_CUSTOMER_PASSWORD |
26
|
|
|
* |
27
|
|
|
* @var int |
28
|
|
|
*/ |
29
|
|
|
protected const MIN_LENGTH_CUSTOMER_PASSWORD = 12; |
30
|
|
|
|
31
|
|
|
/** |
32
|
|
|
* @uses \Pyz\Zed\Customer\CustomerConfig::MAX_LENGTH_CUSTOMER_PASSWORD |
33
|
|
|
* |
34
|
|
|
* @var int |
35
|
|
|
*/ |
36
|
|
|
protected const MAX_LENGTH_CUSTOMER_PASSWORD = 128; |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* @var bool |
40
|
|
|
*/ |
41
|
|
|
protected const IS_ORDER_HISTORY_SEARCH_ENABLED = true; |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* @var string |
45
|
|
|
*/ |
46
|
|
|
protected const PASSWORD_VALIDATION_PATTERN = '/^(?=.*[A-Z])(?=.*[a-z])(?=.*\d)(?=.*[!@#$%^&*()\_\-\=\+\[\]\{\}\|;:<>.,\/?\\~])[A-Za-z\d!@#$%^&*()\_\-\=\+\[\]\{\}\|;:<>.,\/?\\~]+$/'; |
47
|
|
|
|
48
|
|
|
/** |
49
|
|
|
* @var string |
50
|
|
|
*/ |
51
|
|
|
protected const PASSWORD_VALIDATION_MESSAGE = 'global.password.invalid_password'; |
52
|
|
|
|
53
|
|
|
/** |
54
|
|
|
* {@inheritDoc} |
55
|
|
|
* |
56
|
|
|
* @return string|null |
57
|
|
|
*/ |
58
|
|
|
public function loginFailureRedirectUrl(): ?string |
59
|
|
|
{ |
60
|
|
|
return static::LOGIN_FAILURE_REDIRECT_URL; |
61
|
|
|
} |
62
|
|
|
|
63
|
|
|
/** |
64
|
|
|
* @api |
65
|
|
|
* |
66
|
|
|
* @return bool |
67
|
|
|
*/ |
68
|
|
|
public function isDoubleOptInEnabled(): bool |
69
|
|
|
{ |
70
|
|
|
return true; |
71
|
|
|
} |
72
|
|
|
|
73
|
|
|
/** |
74
|
|
|
* {@inheritDoc} |
75
|
|
|
* |
76
|
|
|
* @api |
77
|
|
|
* |
78
|
|
|
* @deprecated Will be removed without replacement. If the future the locale-specific URL will be used. |
79
|
|
|
* |
80
|
|
|
* @return bool |
81
|
|
|
*/ |
82
|
|
|
public function isLocaleInLoginCheckPath(): bool |
83
|
|
|
{ |
84
|
|
|
return true; |
85
|
|
|
} |
86
|
|
|
|
87
|
|
|
/** |
88
|
|
|
* Specification: |
89
|
|
|
* - Returns the pattern for customer password validation. |
90
|
|
|
* |
91
|
|
|
* @api |
92
|
|
|
* |
93
|
|
|
* @return string |
94
|
|
|
*/ |
95
|
|
|
public function getCustomerPasswordPattern(): string |
96
|
|
|
{ |
97
|
|
|
return static::PASSWORD_VALIDATION_PATTERN; |
98
|
|
|
} |
99
|
|
|
|
100
|
|
|
/** |
101
|
|
|
* Specification: |
102
|
|
|
* - Returns the message for customer password validation. |
103
|
|
|
* |
104
|
|
|
* @api |
105
|
|
|
* |
106
|
|
|
* @return string |
107
|
|
|
*/ |
108
|
|
|
public function getPasswordValidationMessage(): string |
109
|
|
|
{ |
110
|
|
|
return static::PASSWORD_VALIDATION_MESSAGE; |
111
|
|
|
} |
112
|
|
|
} |
113
|
|
|
|