public function makeNewToken($key, $duration = 60)
    {
        $token = str_random(32);

        $this->setToken($key, $token, $duration);

        return $token;
    }
public function makeNewToken($key, $duration = 60)
    {
        $token = str_random(32);

        $this->setToken($key, $token, $duration);

        return $token;
    }
public function makeNewToken ( $ key , $ duration = 60 ) { $ token = str_random ( 32 ) ; $ this -> setToken ( $ key , $ token , $ duration ) ; return $ token ; }
Creates a new token and returns it

@param string $key
@param int $duration
@return string
Creates a new token and returns it