snappymail/plugins/two-factor-auth/providers/totp.php

21 lines
370 B
PHP
Raw Normal View History

2021-04-13 17:42:06 +08:00
<?php
class TwoFactorAuthTotp implements TwoFactorAuthInterface
{
public function Label() : string
{
return 'Two Factor Authenticator Code';
}
public function VerifyCode(string $sSecret, string $sCode) : bool
{
return \SnappyMail\TOTP::Verify($sSecret, $sCode);
2021-04-13 17:42:06 +08:00
}
public function CreateSecret() : string
{
return \SnappyMail\TOTP::CreateSecret();
2021-04-13 17:42:06 +08:00
}
}