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.

Parameters

ClockInterface $clock
Repository $cache

at line 36
string generateSecretKey(int $secretLength = 32)

Generate a new secret key.

Parameters

int $secretLength

Return Value

string

at line 50
string qrCodeUrl(string $companyName, string $companyEmail, string $secret)

Get the two factor authentication QR code URL.

Parameters

string $companyName
string $companyEmail
string $secret

Return Value

string

at line 71
bool verify(string $secret, string $code)

Verify the given code.

Parameters

string $secret
string $code

Return Value

bool