diff --git a/app/Auth/Session.php b/app/Auth/Session.php new file mode 100644 index 0000000..82bb95d --- /dev/null +++ b/app/Auth/Session.php @@ -0,0 +1,40 @@ +token; + } + + public function getUserId(): int + { + return $this->userId; + } + + public function getCreatedAt(): DateTimeImmutable + { + return $this->createdAt; + } + + public function getExpiresAt(): DateTimeImmutable + { + return $this->expiresAt; + } + + public function isExpired(DateTimeImmutable $now): bool + { + return $now >= $this->expiresAt; + } +}