fix(firewall): account for authentication failures exactly once
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -12,6 +12,7 @@ class Event
|
||||
private bool $propagationStopped = false;
|
||||
private array $data = [];
|
||||
private float $timestamp;
|
||||
private string $eventId;
|
||||
private ?string $tenantId = null;
|
||||
private ?string $identityId = null;
|
||||
|
||||
@@ -21,6 +22,7 @@ class Event
|
||||
) {
|
||||
$this->data = $data;
|
||||
$this->timestamp = microtime(true);
|
||||
$this->eventId = bin2hex(random_bytes(16));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -80,6 +82,11 @@ class Event
|
||||
return $this->timestamp;
|
||||
}
|
||||
|
||||
public function getEventId(): string
|
||||
{
|
||||
return $this->eventId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop event propagation to subsequent listeners
|
||||
*/
|
||||
@@ -143,4 +150,4 @@ class Event
|
||||
'identityId' => $this->identityId,
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user