comparison lisp/url/url-auth.el @ 57509:e5a1e83cfb02

(url-basic-auth, url-digest-auth): Use read-passwd.
author Richard M. Stallman <rms@gnu.org>
date Sat, 16 Oct 2004 14:54:58 +0000
parents 01934125951e
children 2954cb243379 0fc4928cc48e
comparison
equal deleted inserted replaced
57508:22f6e207e697 57509:e5a1e83cfb02
76 (symbol-value url-basic-auth-storage)))) 76 (symbol-value url-basic-auth-storage))))
77 (cond 77 (cond
78 ((and prompt (not byserv)) 78 ((and prompt (not byserv))
79 (setq user (read-string (url-auth-user-prompt url realm) 79 (setq user (read-string (url-auth-user-prompt url realm)
80 (user-real-login-name)) 80 (user-real-login-name))
81 pass (funcall url-passwd-entry-func "Password: ")) 81 pass (read-passwd "Password: "))
82 (set url-basic-auth-storage 82 (set url-basic-auth-storage
83 (cons (list server 83 (cons (list server
84 (cons path 84 (cons path
85 (setq retval 85 (setq retval
86 (base64-encode-string 86 (base64-encode-string
100 (setq byserv (cdr byserv)))) 100 (setq byserv (cdr byserv))))
101 (if (or (and (not retval) prompt) overwrite) 101 (if (or (and (not retval) prompt) overwrite)
102 (progn 102 (progn
103 (setq user (read-string (url-auth-user-prompt url realm) 103 (setq user (read-string (url-auth-user-prompt url realm)
104 (user-real-login-name)) 104 (user-real-login-name))
105 pass (funcall url-passwd-entry-func "Password: ") 105 pass (read-passwd "Password: ")
106 retval (base64-encode-string (format "%s:%s" user pass)) 106 retval (base64-encode-string (format "%s:%s" user pass))
107 byserv (assoc server (symbol-value url-basic-auth-storage))) 107 byserv (assoc server (symbol-value url-basic-auth-storage)))
108 (setcdr byserv 108 (setcdr byserv
109 (cons (cons path retval) (cdr byserv)))))) 109 (cons (cons path retval) (cdr byserv))))))
110 (t (setq retval nil))) 110 (t (setq retval nil)))
158 byserv (cdr-safe (assoc server url-digest-auth-storage))) 158 byserv (cdr-safe (assoc server url-digest-auth-storage)))
159 (cond 159 (cond
160 ((and prompt (not byserv)) 160 ((and prompt (not byserv))
161 (setq user (read-string (url-auth-user-prompt url realm) 161 (setq user (read-string (url-auth-user-prompt url realm)
162 (user-real-login-name)) 162 (user-real-login-name))
163 pass (funcall url-passwd-entry-func "Password: ") 163 pass (read-passwd "Password: ")
164 url-digest-auth-storage 164 url-digest-auth-storage
165 (cons (list server 165 (cons (list server
166 (cons path 166 (cons path
167 (setq retval 167 (setq retval
168 (cons user 168 (cons user
185 (setq byserv (cdr byserv)))) 185 (setq byserv (cdr byserv))))
186 (if (or (and (not retval) prompt) overwrite) 186 (if (or (and (not retval) prompt) overwrite)
187 (progn 187 (progn
188 (setq user (read-string (url-auth-user-prompt url realm) 188 (setq user (read-string (url-auth-user-prompt url realm)
189 (user-real-login-name)) 189 (user-real-login-name))
190 pass (funcall url-passwd-entry-func "Password: ") 190 pass (read-passwd "Password: ")
191 retval (setq retval 191 retval (setq retval
192 (cons user 192 (cons user
193 (url-digest-auth-create-key 193 (url-digest-auth-create-key
194 user pass realm 194 user pass realm
195 (or url-request-method "GET") 195 (or url-request-method "GET")