mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-11-15 12:15:20 +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();
|
|
}
|
|
|
|
}
|