private function validateToken(JwtToken $token, $isRefresh = false)
    {
        $data = new ValidationData();
        if (isset($this->config['issuer'])) {
            $data->setIssuer($this->config['issuer']);
        }
        if (isset($this->config['audience'])) {
            $data->setAudience($this->config['audience']);
        }
        if ($isRefresh) {
            $data->setExpiration(time() - $this->config['refreshOffsetAllowance']);
        }
        if (!$token->validate($data)) {
            return false;
        }
        return true;
    }