static public function secureUrl($url, $params = []) {
        if (is_array($url)) {
            $url = implode("/", $url);
        }
        $headers = [
            "Authorization: Bearer " . JWT::getInternalToken()
        ];
        $opts = [
            "http" => [
                "method" => "GET",
                "header" => implode("\r\n", $headers)
            ],
            "ssl" => array(
                "verify_peer" => false,
                "verify_peer_name" => false,
            )
        ];
        $stream_context = stream_context_create($opts);
        if (count($params)) {
            $url = $url . "?" . http_build_query($params);
        }
        syslog(LOG_INFO, __METHOD__ . " fetching: " . $url);
        $content = file_get_contents($url, false, $stream_context);
        $result = json_decode($content, JSON_OBJECT_AS_ARRAY);
        return $result;
    }