[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/url-http-ntlm a2cc6c2 23/42: url-http-ntlm: Add auth-so

From: Stefan Monnier
Subject: [elpa] externals/url-http-ntlm a2cc6c2 23/42: url-http-ntlm: Add auth-source support
Date: Sat, 28 Nov 2020 17:19:46 -0500 (EST)

branch: externals/url-http-ntlm
commit a2cc6c2980bbdb974c9ebe64ed66547177d21fe6
Author: Thomas Fitzsimmons <fitzsim@fitzsim.org>
Commit: Thomas Fitzsimmons <fitzsim@fitzsim.org>

    url-http-ntlm: Add auth-source support
    * url-http-ntlm.el (url-http-ntlm--authorisation): Try to read
    user and password using auth-source library.
 url-http-ntlm.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/url-http-ntlm.el b/url-http-ntlm.el
index 25341ae..8cdb7e8 100644
--- a/url-http-ntlm.el
+++ b/url-http-ntlm.el
@@ -197,12 +197,14 @@ stored credentials are not affected."
              (and stored user (not (equal user (cl-second (car stored)))))
              (not stored))
          (let* ((user* (or user
+                           (url-do-auth-source-search server type :user)
                            (read-string (url-auth-user-prompt url realm)
                                         (or user (user-real-login-name)))))
                 (pass* (if both
-                         (read-passwd (format "Password [for %s]: "
-                                              (url-recreate-url url)))))
+                         (or (url-do-auth-source-search server type :secret)
+                             (read-passwd (format "Password [for %s]: "
+                                                  (url-recreate-url url))))))
                 (key   (list type user* server port))
                 (entry `(,key . (,(ntlm-get-password-hashes pass*)))))
            (unless both

reply via email to

[Prev in Thread] Current Thread [Next in Thread]