diff --git a/doc/newsbeuter.txt b/doc/newsbeuter.txt index 53178c99..8107df0d 100644 --- a/doc/newsbeuter.txt +++ b/doc/newsbeuter.txt @@ -669,6 +669,14 @@ authentication is done against Tiny Tiny RSS itself. ttrss-mode "single" # "multi" is default +If Tiny Tiny RSS is configured in multi-user mode and still deployed behind +an additional HTTP-BasicAuth, the required username and password (which may +deviate from ttrss-login and ttrss-password) can be specified in the user-part +of the url like this: + + ttrss-url "http://htuser:htpasswd@example.com/ttrss/" + + With these settings, newsbeuter should be able to connect to Tiny Tiny RSS and download your subscribed feeds. Articles or even complete feeds that you marked as read are synchronized directly to Tiny Tiny RSS. diff --git a/src/ttrss_api.cpp b/src/ttrss_api.cpp index d63b70f0..55c0e359 100644 --- a/src/ttrss_api.cpp +++ b/src/ttrss_api.cpp @@ -12,7 +12,11 @@ namespace newsbeuter { ttrss_api::ttrss_api(configcontainer * c) : remote_api(c) { single = (cfg->get_configvalue("ttrss-mode") == "single"); - auth_info = strprintf::fmt("%s:%s", cfg->get_configvalue("ttrss-login"), cfg->get_configvalue("ttrss-password")); + if (single) { + auth_info = strprintf::fmt("%s:%s", cfg->get_configvalue("ttrss-login"), cfg->get_configvalue("ttrss-password")); + } else { + auth_info = ""; + } sid = ""; } @@ -42,7 +46,11 @@ std::string ttrss_api::retrieve_sid() { args["user"] = single ? "admin" : cred.user.c_str(); args["password"] = cred.pass.c_str(); - auth_info = strprintf::fmt("%s:%s", cred.user, cred.pass); + if (single) { + auth_info = strprintf::fmt("%s:%s", cred.user, cred.pass); + } else { + auth_info = ""; + } json_object * content = run_op("login", args); if (content == nullptr)