[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Refactor digest authentication in url-auth
From: |
Jarno Malmari |
Subject: |
Re: Refactor digest authentication in url-auth |
Date: |
Mon, 27 Mar 2017 22:47:25 +0300 |
> Since no one seems to be interested to review this patch, I did that
> myself. I have two comments:
>
> > +(defun url-digest-auth-build-response (key url realm attrs)
> > + "Compute authorization string for the given challenge using KEY.
> > +
> > +The strings looks like 'Digest username=\"John\", realm=\"The
> > +Realm\", ...'
>
> Typo: should be "look", not "looks".
I decided the typo is in the plural form of "strings" since it describes the
single return value. Fixed.
>
> > +(defun url-digest-find-new-key (url realm prompt)
> > + "Find new key either from auth-source or interactively.
> > +The key is looked for based on URL and REALM. If PROMPT is
> > +non-nil, ask interactively in case credentials weren't found from
> > +auth-source."
>
> This function's doc string looks strikingly different from the rest of
> the functions you wrote: not as detailed and clear as the rest. Can
> you rework it to be more in line with the rest of the functions?
Revised content:
(defun url-digest-find-new-key (url realm prompt)
"Find credentials and create a new authorization key for given URL and REALM.
Return value is the new key, or nil if credentials weren't found.
\"New\" in this context means a key that's not yet found in cache
variable `url-digest-auth-storage'. You may use `url-digest-cache-key'
to put it there.
This function uses `url-digest-find-creds' to find the
credentials. It first looks in auth-source. If not found, and
PROMPT is non-nil, user is asked for credentials interactively
via minibuffer."
>
> With those minor issues fixed, I will push your changes.
Thanks! Update patches follow this mail.