From bc582f852dd771f2574da4228baea3eb38ca22d5 Mon Sep 17 00:00:00 2001 From: Thomas Fitzsimmons Date: Thu, 29 Oct 2015 10:09:07 -0400 Subject: [PATCH] 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 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/url-http-ntlm/url-http-ntlm.el b/packages/url-http-ntlm/url-http-ntlm.el index 25341ae60..8cdb7e870 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 pass - (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 -- 2.39.2