class LoginRateLimiter

Methods

__construct(RateLimiter $limiter)

Create a new login rate limiter instance.

int
attempts(Request $request)

Get the number of attempts for the given key.

bool
tooManyAttempts(Request $request)

Determine if the user has too many failed login attempts.

void
increment(Request $request)

Increment the login attempts for the user.

int
availableIn(Request $request)

Determine the number of seconds until logging in is available again.

void
clear(Request $request)

Clear the login locks for the given user credentials.

string
throttleKey(Request $request)

Get the throttle key for the given request.

Details

at line 17
__construct(RateLimiter $limiter)

Create a new login rate limiter instance.

Parameters

RateLimiter $limiter

at line 25
int attempts(Request $request)

Get the number of attempts for the given key.

Parameters

Request $request

Return Value

int

at line 36
bool tooManyAttempts(Request $request)

Determine if the user has too many failed login attempts.

Parameters

Request $request

Return Value

bool

at line 44
void increment(Request $request)

Increment the login attempts for the user.

Parameters

Request $request

Return Value

void

at line 52
int availableIn(Request $request)

Determine the number of seconds until logging in is available again.

Parameters

Request $request

Return Value

int

at line 60
void clear(Request $request)

Clear the login locks for the given user credentials.

Parameters

Request $request

Return Value

void

at line 79
protected string throttleKey(Request $request)

Get the throttle key for the given request.

Scoped to the current guard so lockouts in one actor silo never block logins in another for the same username and IP.

Parameters

Request $request

Return Value

string