예제 #1
0
 public function saveSecret(Token $token)
 {
     setcookie(self::CV_SECRET, $token->getSecret(), $token->getExpirationDate());
     $_COOKIE[self::CV_SECRET] = $token->getSecret();
 }
예제 #2
0
 /**
  * @param Token $token
  * @return User|null An user object or null if not found
  */
 public function getByToken(Token $token)
 {
     return $this->database->get(User::class, $token->getUserId());
 }