2026-06-14 14:25:19 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Fired after a user successfully authenticates.
|
|
|
|
|
*
|
|
|
|
|
* @package XC_VM_Core_Events
|
|
|
|
|
* @author Divarion_D <https://github.com/Divarion-D>
|
|
|
|
|
* @copyright 2025-2026 Vateron Media
|
|
|
|
|
* @license AGPL-3.0 https://www.gnu.org/licenses/agpl-3.0.html
|
|
|
|
|
*/
|
2026-06-15 18:06:10 +03:00
|
|
|
final class UserAuthenticatedEvent {
|
2026-06-22 11:11:28 +03:00
|
|
|
/**
|
|
|
|
|
* @param int $userId Authenticated user id.
|
|
|
|
|
* @param string $username Authenticated username.
|
|
|
|
|
* @param string $role User role.
|
|
|
|
|
* @param float $authenticatedAt Unix timestamp (with microseconds) of authentication.
|
|
|
|
|
*/
|
2026-06-14 14:25:19 +03:00
|
|
|
public function __construct(
|
2026-06-15 18:06:10 +03:00
|
|
|
public readonly int $userId,
|
|
|
|
|
public readonly string $username,
|
|
|
|
|
public readonly string $role,
|
|
|
|
|
public readonly float $authenticatedAt,
|
2026-06-14 14:25:19 +03:00
|
|
|
) {}
|
|
|
|
|
}
|