5 class Token extends \Rsi\Fred\User\Authenticator{
14 $this->session->time = time();
15 return $this->session->token = \Rsi\Str::random();
18 public function verify($secret,$hash){
21 ($token = $this->session->token) &&
22 ($this->session->time > time() - $this->tokenTime) &&
23 hash_equals(md5($secret . $token),$hash)
25 return $this->checked;
verified($result)
Process the result of a verification.
$tokenTime
Time (in seconds) for which the token is valid.