Skip to content

Commit aa42180

Browse files
ACQE-7352: Fix spomky-labs/otphp deprecation messages
1 parent 02c9885 commit aa42180

File tree

1 file changed

+9
-1
lines changed
  • src/Magento/FunctionalTestingFramework/DataTransport/Auth/Tfa

1 file changed

+9
-1
lines changed

src/Magento/FunctionalTestingFramework/DataTransport/Auth/Tfa/OTP.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use Magento\FunctionalTestingFramework\Exceptions\TestFrameworkException;
1010
use OTPHP\TOTP;
1111
use Magento\FunctionalTestingFramework\DataGenerator\Handlers\CredentialStore;
12+
use DateTimeImmutable;
1213

1314
/**
1415
* Class OTP
@@ -57,7 +58,14 @@ private static function create($path)
5758
throw new TestFrameworkException('Unable to get OTP' . PHP_EOL . $e->getMessage());
5859
}
5960

60-
self::$totps[$path] = TOTP::create($secret);
61+
self::$totps[$path] = TOTP::create(
62+
$secret,
63+
TOTP::DEFAULT_PERIOD,
64+
TOTP::DEFAULT_DIGEST,
65+
TOTP::DEFAULT_DIGITS,
66+
TOTP::DEFAULT_EPOCH,
67+
new DateTimeImmutable()
68+
);
6169
self::$totps[$path]->setIssuer('MFTF');
6270
self::$totps[$path]->setLabel('MFTF Testing');
6371
}

0 commit comments

Comments
 (0)