mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-11-14 19:54:43 +08:00
20 lines
370 B
PHP
20 lines
370 B
PHP
<?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);
|
|
}
|
|
|
|
public function CreateSecret() : string
|
|
{
|
|
return \SnappyMail\TOTP::CreateSecret();
|
|
}
|
|
|
|
}
|