Expiration -> Expires

This commit is contained in:
flash 2023-07-26 18:24:49 +00:00
parent 1d552e907b
commit 86432616c6
2 changed files with 5 additions and 5 deletions

View file

@ -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 {

View file

@ -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 {