private function get_system_oauth_client() {
        if ($this->systemoauthclient === false) {
            try {
                $this->systemoauthclient = \core\oauth2\api::get_system_oauth_client($this->issuer);
            } catch (\moodle_exception $e) {
                $this->systemoauthclient = false;
            }
        }
        return $this->systemoauthclient;
    }