TwoFactorAuthenticationProvider
class TwoFactorAuthenticationProvider implements TwoFactorAuthenticationProvider
Constants
| private ALGORITHM |
|
| private DEFAULT_WINDOW |
|
| private DIGITS |
|
| private PERIOD |
|
Methods
__construct(ClockInterface $clock, Repository $cache)
Create a new two factor authentication provider instance.
string
generateSecretKey(int $secretLength = 32)
Generate a new secret key.
string
qrCodeUrl(string $companyName, string $companyEmail, string $secret)
Get the two factor authentication QR code URL.
bool
verify(string $secret, string $code)
Verify the given code.
Details
at line 27
__construct(ClockInterface $clock, Repository $cache)
Create a new two factor authentication provider instance.
at line 36
string
generateSecretKey(int $secretLength = 32)
Generate a new secret key.
at line 50
string
qrCodeUrl(string $companyName, string $companyEmail, string $secret)
Get the two factor authentication QR code URL.
at line 71
bool
verify(string $secret, string $code)
Verify the given code.