Function: url-digest-auth
url-digest-auth is a byte-compiled function defined in url-auth.el.gz.
Signature
(url-digest-auth URL &optional PROMPT OVERWRITE REALM ATTRS)
Documentation
Get the HTTP Digest response string for the specified URL.
If optional argument PROMPT is non-nil, ask for the username and password to use for the URL and its descendants but only if one cannot be found from cache. Look also in Emacs auth-source.
If optional third argument OVERWRITE is non-nil, overwrite the old credentials, if they're found in cache, with new ones from user prompt or from Emacs auth-source.
If REALM is specified, use that instead of the URL descendant method to match cached credentials.
Alist ATTRS contains additional attributes for the authentication challenge such as nonce and opaque.
Source Code
;; Defined in /usr/src/emacs/lisp/url/url-auth.el.gz
(defun url-digest-auth (url &optional prompt overwrite realm attrs)
"Get the HTTP Digest response string for the specified URL.
If optional argument PROMPT is non-nil, ask for the username and
password to use for the URL and its descendants but only if one
cannot be found from cache. Look also in Emacs auth-source.
If optional third argument OVERWRITE is non-nil, overwrite the
old credentials, if they're found in cache, with new ones from
user prompt or from Emacs auth-source.
If REALM is specified, use that instead of the URL descendant
method to match cached credentials.
Alist ATTRS contains additional attributes for the authentication
challenge such as nonce and opaque."
(if attrs
(let* ((href (if (stringp url) (url-generic-parse-url url) url))
(enable-recursive-minibuffers t)
(key (url-digest-cached-key href realm)))
(if (or (null key) overwrite)
(let ((newkey (url-digest-find-new-key href realm (cond
(key nil)
(t prompt)))))
(if (and newkey key overwrite)
(setcdr key (cdr newkey))
(if (and newkey (null key))
(url-digest-cache-key (setq key newkey) href)))))
(if key
(url-digest-auth-build-response key href realm attrs)))))