Skip to content

Commit 25d28a8

Browse files
Rizwan KhanRizwan Khan
authored andcommitted
AC-9797: 2FA functionality enhancement
1 parent a8f42f1 commit 25d28a8

File tree

2 files changed

+0
-56
lines changed

2 files changed

+0
-56
lines changed

TwoFactorAuth/Block/Provider/Authy/Auth.php

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,37 +8,12 @@
88
namespace Magento\TwoFactorAuth\Block\Provider\Authy;
99

1010
use Magento\Backend\Block\Template;
11-
use Magento\Framework\App\Config\ScopeConfigInterface;
1211

1312
/**
1413
* @api
1514
*/
1615
class Auth extends Template
1716
{
18-
/**
19-
* Config path for the 2FA Attempts
20-
*/
21-
private const XML_PATH_2FA_RETRY_ATTEMPTS = 'twofactorauth/general/twofactorauth_retry';
22-
23-
/**
24-
* @var ScopeConfigInterface
25-
*/
26-
private $scopeConfig;
27-
28-
/**
29-
* @param \Magento\Backend\Block\Template\Context $context
30-
* @param ScopeConfigInterface $scopeConfig
31-
* @param array $data
32-
*/
33-
public function __construct(
34-
\Magento\Backend\Block\Template\Context $context,
35-
ScopeConfigInterface $scopeConfig,
36-
array $data = []
37-
) {
38-
parent::__construct($context, $data);
39-
$this->scopeConfig = $scopeConfig;
40-
}
41-
4217
/**
4318
* @inheritdoc
4419
*/
@@ -59,9 +34,6 @@ public function getJsLayout()
5934
$this->jsLayout['components']['tfa-auth']['successUrl'] =
6035
$this->getUrl($this->_urlBuilder->getStartupPageUrl());
6136

62-
$this->jsLayout['components']['tfa-auth']['attempts'] =
63-
$this->scopeConfig->getValue(self::XML_PATH_2FA_RETRY_ATTEMPTS);
64-
6537
return parent::getJsLayout();
6638
}
6739
}

TwoFactorAuth/Block/Provider/Google/Auth.php

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,37 +8,12 @@
88
namespace Magento\TwoFactorAuth\Block\Provider\Google;
99

1010
use Magento\Backend\Block\Template;
11-
use Magento\Framework\App\Config\ScopeConfigInterface;
1211

1312
/**
1413
* @api
1514
*/
1615
class Auth extends Template
1716
{
18-
/**
19-
* Config path for the 2FA Attempts
20-
*/
21-
public const XML_PATH_2FA_RETRY_ATTEMPTS = 'twofactorauth/general/twofactorauth_retry';
22-
23-
/**
24-
* @var ScopeConfigInterface
25-
*/
26-
private $scopeConfig;
27-
28-
/**
29-
* @param \Magento\Backend\Block\Template\Context $context
30-
* @param ScopeConfigInterface $scopeConfig
31-
* @param array $data
32-
*/
33-
public function __construct(
34-
\Magento\Backend\Block\Template\Context $context,
35-
ScopeConfigInterface $scopeConfig,
36-
array $data = []
37-
) {
38-
parent::__construct($context, $data);
39-
$this->scopeConfig = $scopeConfig;
40-
}
41-
4217
/**
4318
* @inheritdoc
4419
*/
@@ -50,9 +25,6 @@ public function getJsLayout()
5025
$this->jsLayout['components']['tfa-auth']['successUrl'] =
5126
$this->getUrl($this->_urlBuilder->getStartupPageUrl());
5227

53-
$this->jsLayout['components']['tfa-auth']['attempts'] =
54-
$this->scopeConfig->getValue(self::XML_PATH_2FA_RETRY_ATTEMPTS);
55-
5628
return parent::getJsLayout();
5729
}
5830
}

0 commit comments

Comments
 (0)