ThrottlesLogins

trait ThrottlesLogins (View source)

Methods

bool hasTooManyLoginAttempts(Request $request)

Determine if the user has too many failed login attempts.

int incrementLoginAttempts(Request $request)

Increment the login attempts for the user.

int retriesLeft(Request $request)

Determine how many retries are left for the user.

RedirectResponse sendLockoutResponse(Request $request)

Redirect the user after determining they are locked out.

string getLockoutErrorMessage(int $seconds)

Get the login lockout error message.

int secondsRemainingOnLockout(Request $request)

Get the lockout seconds.

void clearLoginAttempts(Request $request)

Clear the login locks for the given user credentials.

string getThrottleKey(Request $request)

Get the throttle key for the given request.

int maxLoginAttempts()

Get the maximum number of login attempts for delaying further attempts.

int lockoutTime()

The number of seconds to delay further login attempts.

void fireLockoutEvent(Request $request)

Fire an event when a lockout occurs.

Details

protected bool hasTooManyLoginAttempts(Request $request)

Determine if the user has too many failed login attempts.

Parameters

Request $request

Return Value

bool

protected int incrementLoginAttempts(Request $request)

Increment the login attempts for the user.

Parameters

Request $request

Return Value

int

protected int retriesLeft(Request $request)

Determine how many retries are left for the user.

Parameters

Request $request

Return Value

int

protected RedirectResponse sendLockoutResponse(Request $request)

Redirect the user after determining they are locked out.

Parameters

Request $request

Return Value

RedirectResponse

protected string getLockoutErrorMessage(int $seconds)

Get the login lockout error message.

Parameters

int $seconds

Return Value

string

protected int secondsRemainingOnLockout(Request $request)

Get the lockout seconds.

Parameters

Request $request

Return Value

int

protected void clearLoginAttempts(Request $request)

Clear the login locks for the given user credentials.

Parameters

Request $request

Return Value

void

protected string getThrottleKey(Request $request)

Get the throttle key for the given request.

Parameters

Request $request

Return Value

string

protected int maxLoginAttempts()

Get the maximum number of login attempts for delaying further attempts.

Return Value

int

protected int lockoutTime()

The number of seconds to delay further login attempts.

Return Value

int

protected void fireLockoutEvent(Request $request)

Fire an event when a lockout occurs.

Parameters

Request $request

Return Value

void

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.2/Illuminate/Foundation/Auth/ThrottlesLogins.html