LoginAttemptService
class LoginAttemptService (View source)
Constants
| STAGE_PASSWORD |
Kept as string constants for callers; {LoginAttemptStage} owns the vocabulary. |
| STAGE_MFA |
|
Methods
void
recordAttempt(string $username, string $ipAddress, bool $successful, string $attemptType = self::STAGE_PASSWORD, int|null $userId = null)
No description
bool
isIpBlacklisted(string $ipAddress)
Whether the address is on the configured lockout blacklist.
bool
isAccountLocked(string $username, string $ipAddress, string $attemptType = self::STAGE_PASSWORD, int|null $userId = null)
No description
bool
isIpInList(string $ipAddress, array $ipList)
Check if an IP address is in the given list.
Details
__construct(PDO $connection, ConfigurationManager|null $configManager = null)
No description
void
recordAttempt(string $username, string $ipAddress, bool $successful, string $attemptType = self::STAGE_PASSWORD, int|null $userId = null)
No description
bool
isIpBlacklisted(string $ipAddress)
Whether the address is on the configured lockout blacklist.
bool
isAccountLocked(string $username, string $ipAddress, string $attemptType = self::STAGE_PASSWORD, int|null $userId = null)
No description
bool
isIpInList(string $ipAddress, array $ipList)
Check if an IP address is in the given list.
Supports individual IPs, CIDRs (e.g., 192.168.1.0/24), and wildcards (e.g., 192.168.1.*)