diff --git a/src/Auth/RecoveryTokenInfo.php b/src/Auth/RecoveryTokenInfo.php index 5c18537..5f1a1f6 100644 --- a/src/Auth/RecoveryTokenInfo.php +++ b/src/Auth/RecoveryTokenInfo.php @@ -40,16 +40,16 @@ class RecoveryTokenInfo { return DateTime::fromUnixTimeSeconds($this->created); } - public function getExpirationTime(): int { + public function getExpiresTime(): int { return $this->created + self::LIFETIME; } - public function getExpirationAt(): bool { + public function getExpiresAt(): bool { return DateTime::fromUnixTimeSeconds($this->created + self::LIFETIME); } public function hasExpired(): bool { - return $this->getExpirationTime() <= time(); + return $this->getExpiresTime() <= time(); } public function hasCode(): bool { diff --git a/src/Users/UserAuthSession.php b/src/Users/UserAuthSession.php index cf0aeb0..fdfab56 100644 --- a/src/Users/UserAuthSession.php +++ b/src/Users/UserAuthSession.php @@ -36,11 +36,11 @@ class UserAuthSession { public function getCreationTime(): int { return $this->tfa_created === null ? -1 : $this->tfa_created; } - public function getExpirationTime(): int { + public function getExpiresTime(): int { return $this->getCreationTime() + self::TOKEN_LIFETIME; } public function hasExpired(): bool { - return $this->getExpirationTime() <= time(); + return $this->getExpiresTime() <= time(); } public function delete(): void {