branch: master
commit bc582f852dd771f2574da4228baea3eb38ca22d5
Author: Thomas Fitzsimmons <[email protected]>
Commit: Thomas Fitzsimmons <[email protected]>
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
b/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
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