Prepare for logging
parent
0d05d66c0f
commit
76f4e0e3c8
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
class RateLimiter {
|
class RateLimiter {
|
||||||
private $db;
|
private $db;
|
||||||
|
private $log;
|
||||||
private $maxAttempts = 5; // Maximum login attempts
|
private $maxAttempts = 5; // Maximum login attempts
|
||||||
private $decayMinutes = 15; // Time window in minutes
|
private $decayMinutes = 15; // Time window in minutes
|
||||||
private $ratelimitTable = 'login_attempts';
|
private $ratelimitTable = 'login_attempts';
|
||||||
|
@ -9,6 +10,7 @@ class RateLimiter {
|
||||||
|
|
||||||
public function __construct($database) {
|
public function __construct($database) {
|
||||||
$this->db = $database->getConnection();
|
$this->db = $database->getConnection();
|
||||||
|
$this->log = new Log($database);
|
||||||
$this->createTablesIfNotExists();
|
$this->createTablesIfNotExists();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue