diff options
Diffstat (limited to 'content/urldb.h')
-rw-r--r-- | content/urldb.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/content/urldb.h b/content/urldb.h index 4aa548704..c68c2a611 100644 --- a/content/urldb.h +++ b/content/urldb.h @@ -75,6 +75,27 @@ nserror urldb_set_url_content_type(struct nsurl *url, content_type type); /** + * 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); + + +/** * Update an URL's visit data * * \param url The URL to update @@ -131,4 +152,22 @@ bool urldb_set_cookie(const char *header, struct nsurl *url, struct nsurl *refer char *urldb_get_cookie(struct nsurl *url, bool include_http_only); +/** + * Set HSTS policy for an URL + * + * \param url URL being fetched + * \param header Strict-Transport-Security header value + * \return true on success, false otherwise + */ +bool urldb_set_hsts_policy(struct nsurl *url, const char *header); + + +/** + * Determine if HSTS policy is enabled for an URL + * + * \param url URL being fetched + * \return true if HSTS policy is enabled, false otherwise + */ +bool urldb_get_hsts_enabled(struct nsurl *url); + #endif |