protected function validateTokenParams()
    {
        if (empty($this->tokenUrl) || filter_var($this->tokenUrl, FILTER_VALIDATE_URL) === false) {
            throw new Oauth2ClientException(sprintf(self::INVALID_TOKEN_URL, $this->tokenUrl));
        }

        if (empty($this->clientId)) {
            throw new Oauth2ClientException(self::INVALID_CLIENT_ID);
        }

        if (empty($this->clientSecret)) {
            throw new Oauth2ClientException(self::INVALID_CLIENT_SECRET);
        }

        return true;
    }