We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7432b52 commit 93b45d6Copy full SHA for 93b45d6
src/Magento/FunctionalTestingFramework/DataTransport/Auth/Tfa.php
@@ -20,6 +20,13 @@ class Tfa
20
const ADMIN_FORM_AUTH_GOOGLE = 'tfa/google/authpost/?isAjax=true';
21
const TFA_SCHEMA = 'schema?services=twoFactorAuthAdminTokenServiceV1';
22
23
+ /**
24
+ * If 2FA is enabled
25
+ *
26
+ * @var boolean|null
27
+ */
28
+ private static $tfaEnabled = null;
29
+
30
/** Rest request headers
31
*
32
* @var string[]
@@ -55,6 +62,10 @@ class Tfa
55
62
*/
56
63
public static function isEnabled()
57
64
{
65
+ if (self::$tfaEnabled !== null) {
66
+ return self::$tfaEnabled;
67
+ }
68
58
69
$schemaUrl = MftfGlobals::getWebApiBaseUrl() . self::TFA_SCHEMA;
59
70
$transport = new CurlTransport();
60
71
try {
0 commit comments