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.

Details

at line 16
__construct(RateLimiter $limiter)

Create a new login rate limiter instance.

Parameters

RateLimiter $limiter

at line 24
int attempts(Request $request)

Get the number of attempts for the given key.

Parameters

Request $request

Return Value

int

at line 32
bool tooManyAttempts(Request $request)

Determine if the user has too many failed login attempts.

Parameters

Request $request

Return Value

bool

at line 40
void increment(Request $request)

Increment the login attempts for the user.

Parameters

Request $request

Return Value

void

at line 48
int availableIn(Request $request)

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

Parameters

Request $request

Return Value

int

at line 56
void clear(Request $request)

Clear the login locks for the given user credentials.

Parameters

Request $request

Return Value

void