def logged_in()

in jbi/bugzilla/client.py [0:0]


    def logged_in(self) -> bool:
        """Verify the API key validity."""
        # https://bugzilla.readthedocs.io/en/latest/api/core/v1/user.html#who-am-i
        try:
            resp = self._call("GET", f"{self.base_url}/rest/whoami")
        except (requests.HTTPError, BugzillaClientError):
            return False
        return "id" in resp