trait TwoFactorAuthenticatable

Methods

bool
hasEnabledTwoFactorAuthentication()

Determine if two-factor authentication has been enabled.

array
recoveryCodes()

Get the user's two factor authentication recovery codes.

bool
consumeRecoveryCode(string $code)

Consume the given recovery code if it is still valid.

void
replaceRecoveryCode(string $code)

Replace the given recovery code with a new one in the user's stored codes.

void
dispatchRecoveryCodeReplacedEvent(string $code)

Dispatch the recovery code replaced event if listeners are registered.

string
twoFactorQrCodeSvg()

Get the QR code SVG of the user's two factor authentication QR code URL.

string
twoFactorQrCodeUrl()

Get the two factor authentication QR code URL.

Details

at line 27
bool hasEnabledTwoFactorAuthentication()

Determine if two-factor authentication has been enabled.

Return Value

bool

at line 42
array recoveryCodes()

Get the user's two factor authentication recovery codes.

Return Value

array

at line 60
bool consumeRecoveryCode(string $code)

Consume the given recovery code if it is still valid.

Parameters

string $code

Return Value

bool

at line 116
void replaceRecoveryCode(string $code)

Replace the given recovery code with a new one in the user's stored codes.

Parameters

string $code

Return Value

void

at line 124
protected void dispatchRecoveryCodeReplacedEvent(string $code)

Dispatch the recovery code replaced event if listeners are registered.

Parameters

string $code

Return Value

void

at line 136
string twoFactorQrCodeSvg()

Get the QR code SVG of the user's two factor authentication QR code URL.

Return Value

string

at line 146
string twoFactorQrCodeUrl()

Get the two factor authentication QR code URL.

Return Value

string