[Top][All Lists]

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

[elpa] master bc582f8 23/32: url-http-ntlm: Add auth-source support

From: Thomas Fitzsimmons
Subject: [elpa] master bc582f8 23/32: url-http-ntlm: Add auth-source support
Date: Thu, 18 Feb 2016 03:28:49 +0000

branch: master
commit bc582f852dd771f2574da4228baea3eb38ca22d5
Author: Thomas Fitzsimmons <address@hidden>
Commit: Thomas Fitzsimmons <address@hidden>

    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.
 packages/url-http-ntlm/url-http-ntlm.el |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/packages/url-http-ntlm/url-http-ntlm.el 
index 25341ae..8cdb7e8 100644
--- a/packages/url-http-ntlm/url-http-ntlm.el
+++ b/packages/url-http-ntlm/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]