Base API, and more solid key and check

This commit is contained in:
Juan Pablo Vial
2024-03-20 23:07:49 -03:00
parent f3a5fa2cdc
commit 444ff687fc
8 changed files with 72 additions and 6 deletions

View File

@ -47,6 +47,14 @@ class Login
}
return $login->user;
}
public function getToken(): string
{
return implode($this->cookie_separator, [$this->selector, $this->token]);
}
public function getSeparator(): string
{
return $this->cookie_separator;
}
public function validateUser(Model\User $user, string $encryptedPassword): bool
{
list($passphrase, $encrypted) = $this->splitPassword($encryptedPassword);