diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2018-08-15 07:32:56 +0100 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2018-08-15 07:32:56 +0100 |
commit | 77ae1ed7581e80691fc9e5bafd910a3f36a7d12a (patch) | |
tree | 88b47533d23194832786c759ea8123d11d6283be /include | |
parent | 9fa6c1e0fb2d6f5a0c95e7680b0ad24f9f7615db (diff) | |
parent | 5e97a3cb26e99ceac27f95be7a7527c630910ebf (diff) | |
download | netsurf-77ae1ed7581e80691fc9e5bafd910a3f36a7d12a.tar.gz netsurf-77ae1ed7581e80691fc9e5bafd910a3f36a7d12a.tar.bz2 |
Merge branch 'tlsa/401'
Diffstat (limited to 'include')
-rw-r--r-- | include/netsurf/misc.h | 33 | ||||
-rw-r--r-- | include/netsurf/url_db.h | 21 |
2 files changed, 30 insertions, 24 deletions
diff --git a/include/netsurf/misc.h b/include/netsurf/misc.h index 2647b9a1c..cd86cf644 100644 --- a/include/netsurf/misc.h +++ b/include/netsurf/misc.h @@ -91,13 +91,40 @@ struct gui_misc_table { * \param cbpw Context pointer passed to cb * \return NSERROR_OK on sucess else error and cb never called */ - nserror (*cert_verify)(struct nsurl *url, const struct ssl_cert_info *certs, unsigned long num, nserror (*cb)(bool proceed, void *pw), void *cbpw); + nserror (*cert_verify)(struct nsurl *url, + const struct ssl_cert_info *certs, + unsigned long num, + nserror (*cb)(bool proceed, void *pw), + void *cbpw); /** * Prompt user for login + * + * To cancel a login, clients should call the `cb` callback passing + * NULL for username, and password. Otherwise, for logins, username + * and password should both be non-NULL. Pass "" if the empty string + * is required. + * + * If the front end returns NSERROR_OK for this function, they must, + * at some future time, call the `cb` with `cbpw` callback exactly once. + * + * If ther front end returns other than NSERROR_OK, they should not + * call the `cb` callback. + * + * \param url The URL being verified. + * \param realm The authorization realm. + * \param username Any current username (or empty string). + * \param password Any current password (or empty string). + * \param cb Callback upon user decision. + * \param cbpw Context pointer passed to cb + * \return NSERROR_OK on sucess else error and cb never called */ - void (*login)(struct nsurl *url, const char *realm, - nserror (*cb)(bool proceed, void *pw), void *cbpw); + nserror (*login)(struct nsurl *url, const char *realm, + const char *username, const char *password, + nserror (*cb)(const char *username, + const char *password, + void *pw), + void *cbpw); /** * Prompt the user for a password for a PDF. diff --git a/include/netsurf/url_db.h b/include/netsurf/url_db.h index 217cf8fcd..071675652 100644 --- a/include/netsurf/url_db.h +++ b/include/netsurf/url_db.h @@ -58,27 +58,6 @@ nserror urldb_save(const char *filename); /** - * Set authentication data for an URL - * - * \param url The URL to consider - * \param realm The authentication realm - * \param auth The authentication details (in form username:password) - */ -void urldb_set_auth_details(struct nsurl *url, const char *realm, const char *auth); - - -/** - * Look up authentication details in database - * - * \param url Absolute URL to search for - * \param realm When non-NULL, it is realm which can be used to determine - * the protection space when that's not been done before for given URL. - * \return Pointer to authentication details, or NULL if not found - */ -const char *urldb_get_auth_details(struct nsurl *url, const char *realm); - - -/** * Iterate over entries in the database which match the given prefix * * \param prefix Prefix to match |