public function isValid($ifSession = false, $httpClient = null) {
        if ($ifSession) { return true; }

        if (!$this->ssoTokenExists() || $this->isRemoteCheckRequired()) {
            if ($this->performRemoteCheck($httpClient)) {
                $this->save();
                return true;
            } else {
                return false;
            }
        } else {
            return true;
        }
    }