Documentation

LoginAttempt
in package

Table of Contents

Properties

$loginAttemptMapper  : LoginAttempt
$rateLimitConfig  : array<string|int, mixed>
$remoteAddress  : string

Methods

__construct()  : mixed
deletedOldLoginAttempts()  : void
Delete all (failed) login attempts that are older than 3 months.
logFailedLogin()  : void
Log a failed login attempt.
loginAttemptsExceeded()  : bool
Check if there are too many login tries for a specific account.

Properties

$rateLimitConfig read-only

private array<string|int, mixed> $rateLimitConfig

Methods

__construct()

public __construct(string $remoteAddress, LoginAttempt $loginAttemptMapper, array<string|int, mixed> $rateLimitConfig) : mixed
Parameters
$remoteAddress : string
$loginAttemptMapper : LoginAttempt
$rateLimitConfig : array<string|int, mixed>
Tags
phpcsSuppress

SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification

deletedOldLoginAttempts()

Delete all (failed) login attempts that are older than 3 months.

public deletedOldLoginAttempts() : void

We can automatically DELETE all login attempts at once instead of retrieving them and iterating over them.


        
On this page

Search results