1 |
;;; url-auth.el --- Uniform Resource Locator authorization modules |
;;; url-auth.el --- Uniform Resource Locator authorization modules |
2 |
|
|
3 |
|
;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc. |
4 |
|
|
5 |
;; Keywords: comm, data, processes, hypermedia |
;; Keywords: comm, data, processes, hypermedia |
6 |
|
|
7 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; This file is part of GNU Emacs. |
8 |
;;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc. |
|
9 |
;;; |
;; GNU Emacs is free software; you can redistribute it and/or modify |
10 |
;;; This file is part of GNU Emacs. |
;; it under the terms of the GNU General Public License as published by |
11 |
;;; |
;; the Free Software Foundation; either version 2, or (at your option) |
12 |
;;; GNU Emacs is free software; you can redistribute it and/or modify |
;; any later version. |
13 |
;;; it under the terms of the GNU General Public License as published by |
|
14 |
;;; the Free Software Foundation; either version 2, or (at your option) |
;; GNU Emacs is distributed in the hope that it will be useful, |
15 |
;;; any later version. |
;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 |
;;; |
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
17 |
;;; GNU Emacs is distributed in the hope that it will be useful, |
;; GNU General Public License for more details. |
18 |
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
19 |
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
;; You should have received a copy of the GNU General Public License |
20 |
;;; GNU General Public License for more details. |
;; along with GNU Emacs; see the file COPYING. If not, write to the |
21 |
;;; |
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
22 |
;;; You should have received a copy of the GNU General Public License |
;; Boston, MA 02111-1307, USA. |
23 |
;;; along with GNU Emacs; see the file COPYING. If not, write to the |
|
24 |
;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
;;; Code: |
|
;;; Boston, MA 02111-1307, USA. |
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|
25 |
|
|
26 |
(require 'url-vars) |
(require 'url-vars) |
27 |
(require 'url-parse) |
(require 'url-parse) |
79 |
((and prompt (not byserv)) |
((and prompt (not byserv)) |
80 |
(setq user (read-string (url-auth-user-prompt url realm) |
(setq user (read-string (url-auth-user-prompt url realm) |
81 |
(user-real-login-name)) |
(user-real-login-name)) |
82 |
pass (funcall url-passwd-entry-func "Password: ")) |
pass (read-passwd "Password: ")) |
83 |
(set url-basic-auth-storage |
(set url-basic-auth-storage |
84 |
(cons (list server |
(cons (list server |
85 |
(cons path |
(cons path |
103 |
(progn |
(progn |
104 |
(setq user (read-string (url-auth-user-prompt url realm) |
(setq user (read-string (url-auth-user-prompt url realm) |
105 |
(user-real-login-name)) |
(user-real-login-name)) |
106 |
pass (funcall url-passwd-entry-func "Password: ") |
pass (read-passwd "Password: ") |
107 |
retval (base64-encode-string (format "%s:%s" user pass)) |
retval (base64-encode-string (format "%s:%s" user pass)) |
108 |
byserv (assoc server (symbol-value url-basic-auth-storage))) |
byserv (assoc server (symbol-value url-basic-auth-storage))) |
109 |
(setcdr byserv |
(setcdr byserv |
161 |
((and prompt (not byserv)) |
((and prompt (not byserv)) |
162 |
(setq user (read-string (url-auth-user-prompt url realm) |
(setq user (read-string (url-auth-user-prompt url realm) |
163 |
(user-real-login-name)) |
(user-real-login-name)) |
164 |
pass (funcall url-passwd-entry-func "Password: ") |
pass (read-passwd "Password: ") |
165 |
url-digest-auth-storage |
url-digest-auth-storage |
166 |
(cons (list server |
(cons (list server |
167 |
(cons path |
(cons path |
188 |
(progn |
(progn |
189 |
(setq user (read-string (url-auth-user-prompt url realm) |
(setq user (read-string (url-auth-user-prompt url realm) |
190 |
(user-real-login-name)) |
(user-real-login-name)) |
191 |
pass (funcall url-passwd-entry-func "Password: ") |
pass (read-passwd "Password: ") |
192 |
retval (setq retval |
retval (setq retval |
193 |
(cons user |
(cons user |
194 |
(url-digest-auth-create-key |
(url-digest-auth-create-key |
315 |
(provide 'url-auth) |
(provide 'url-auth) |
316 |
|
|
317 |
;;; arch-tag: 04058625-616d-44e4-9dbf-4b46b00b2a91 |
;;; arch-tag: 04058625-616d-44e4-9dbf-4b46b00b2a91 |
318 |
|
;;; url-auth.el ends here |