public function generateAuthToken($user) { $header = new JwtHeader($this->getAuthKey()); $jwt = new Jwt($header); $jwt->custom($this->getAuthOptions()); $jwt->issuer($this->getForestUri())->issuedAt(time())->notBefore(time() + 60)->expireTime(time() + 3600)->jwtId($user->id); return $jwt->encode(); }