[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/url-http-ntlm 530faf7 04/42: url-http-ntlm: Wrap lines
From: |
Stefan Monnier |
Subject: |
[elpa] externals/url-http-ntlm 530faf7 04/42: url-http-ntlm: Wrap lines at column 80 |
Date: |
Sat, 28 Nov 2020 17:19:42 -0500 (EST) |
branch: externals/url-http-ntlm
commit 530faf78e822d1622371b127e4a9a88f63113ecd
Author: Thomas Fitzsimmons <fitzsim@fitzsim.org>
Commit: Thomas Fitzsimmons <fitzsim@fitzsim.org>
url-http-ntlm: Wrap lines at column 80
* url-http-ntlm.el (url-ntlm-ensure-keepalive, url-ntlm-last-args)
(url-ntlm-get-stage, url-http-ntlm-authorisation): Wrap lines at
column 80.
---
url-http-ntlm.el | 46 +++++++++++++++++++++++++++-------------------
1 file changed, 27 insertions(+), 19 deletions(-)
diff --git a/url-http-ntlm.el b/url-http-ntlm.el
index 7488416..1e4e7bc 100644
--- a/url-http-ntlm.el
+++ b/url-http-ntlm.el
@@ -25,16 +25,17 @@
;;
;; Installation:
;;
-;; Add the directory containing this file to the load path and then load the
url-http-ntlm
-;; package. One way would be to add something like the lines below to your
.emacs file:
+;; Add the directory containing this file to the load path and then
+;; load the url-http-ntlm package. One way would be to add something
+;; like the lines below to your .emacs file:
;;
;; (add-to-list 'load-path ".emacs.d/url-http-ntlm")
;; (require 'url-http-ntlm)
;;
;; Acknowledgements:
;;
-;; Taro Kawagishi <tarok@transpulse.org> wrote ntlm.el and md4.el, which are
parts of FLIM
-;; (Faithful Library about Internet Message).
+;; Taro Kawagishi <tarok@transpulse.org> wrote ntlm.el and md4.el,
+;; which are parts of FLIM (Faithful Library about Internet Message).
;;
;; http://stuff.mit.edu/afs/sipb/contrib/emacs/packages/flim-1.14.7/ntlm.el
;; http://stuff.mit.edu/afs/sipb/contrib/emacs/packages/flim-1.14.7/md4.el
@@ -93,27 +94,30 @@ Note that for any server, only one user and password is
ever stored.")
(defun url-ntlm-ensure-keepalive ()
(assert url-http-attempt-keepalives
nil
- "NTLM authentication won't work unless `url-http-attempt-keepalives'
is set!"))
+ (concat "NTLM authentication won't work unless"
+ " `url-http-attempt-keepalives' is set!")))
(defun url-ntlm-clean-headers ()
(setq url-http-extra-headers
(url-http-ntlm-rmssoc "Authorization" url-http-extra-headers)))
(defvar url-ntlm-last-args nil
- "Stores the last ARGS argument to `url-ntlm-get-stage' and the return value.
This is
- used to detect multiple calls.")
+ "Stores the last ARGS argument to `url-ntlm-get-stage' and the return value.
+This is used to detect multiple calls.")
(make-variable-buffer-local 'url-ntlm-last-args)
(defun url-ntlm-get-stage (args)
"Determine what stage of the NTLM handshake we are at.
-
-PROMPT and ARGS come from `url-ntlm-auth''s caller, `url-get-authentication'.
Their
-meaning depends on the current implementation - this function is well and
truly coupled...
-
-url-get-authentication' calls `url-ntlm-auth' once when checking what
authentication
-schemes are supported (PROMPT and ARGS are nil), and then twice for every
stage of the
-handshake: the first time PROMPT is nil, the second, t; ARGS contains the
server
-response's \"WWW-Authenticate\" header, munged by `url-parse-args'."
+PROMPT and ARGS come from `url-ntlm-auth''s caller,
+`url-get-authentication'. Their meaning depends on the current
+implementation - this function is well and truly coupled.
+
+url-get-authentication' calls `url-ntlm-auth' once when checking
+what authentication schemes are supported (PROMPT and ARGS are
+nil), and then twice for every stage of the handshake: the first
+time PROMPT is nil, the second, t; ARGS contains the server
+response's \"WWW-Authenticate\" header, munged by
+`url-parse-args'."
(let* ((response-rxp "^NTLM TlRMTVNTUAADAAA")
(challenge-rxp "^TLRMTVNTUAACAAA")
(auth-header (assoc "Authorization" url-http-extra-headers))
@@ -124,12 +128,14 @@ response's \"WWW-Authenticate\" header, munged by
`url-parse-args'."
(cdr url-ntlm-last-args)
;;
(let ((stage
- (cond ((and auth-header (string-match response-rxp (cdr
auth-header)))
+ (cond ((and auth-header (string-match response-rxp
+ (cdr auth-header)))
:error)
((and (= (length args) 2)
(destructuring-bind (challenge ntlm) args
(and (string-equal "ntlm" (car ntlm))
- (string-match challenge-rxp (car
challenge)))))
+ (string-match challenge-rxp
+ (car challenge)))))
:response)
(t
:request))))
@@ -172,11 +178,13 @@ stored."
(pass* (if both
pass
(read-passwd "Password: ")))
- (entry `(,server . (,user* ,(ntlm-get-password-hashes
pass*)))))
+ (entry `(,server . (,user*
+ ,(ntlm-get-password-hashes pass*)))))
(unless both
(setq url-http-ntlm-auth-storage
(cons entry
- (url-http-ntlm-rmssoc server
url-http-ntlm-auth-storage))))
+ (url-http-ntlm-rmssoc server
+
url-http-ntlm-auth-storage))))
entry)
;;
stored))))
- [elpa] externals/url-http-ntlm 48849b1 31/42: url-http-ntlm.el: Update copyright years, (continued)
- [elpa] externals/url-http-ntlm 48849b1 31/42: url-http-ntlm.el: Update copyright years, Stefan Monnier, 2020/11/28
- [elpa] externals/url-http-ntlm d070501 29/42: url-http-ntlm: Add cl-lib to Package-Requires, Stefan Monnier, 2020/11/28
- [elpa] externals/url-http-ntlm b92ef48 37/42: url-http-ntlm: Bump ntlm required version to 2.1.0, Stefan Monnier, 2020/11/28
- [elpa] externals/url-http-ntlm c7587cb 39/42: url-http-ntlm.el: Omit user and domain in Type 1 message, Stefan Monnier, 2020/11/28
- [elpa] externals/url-http-ntlm 5ca617f 40/42: url-http-ntlm: Bump version to 2.0.4, Stefan Monnier, 2020/11/28
- [elpa] externals/url-http-ntlm ec0acb3 30/42: url-http-ntlm.el: Bump version to 2.0.0, Stefan Monnier, 2020/11/28
- [elpa] externals/url-http-ntlm 4c2295b 35/42: Fix some quoting problems in doc strings, Stefan Monnier, 2020/11/28
- [elpa] externals/url-http-ntlm f5276f1 42/42: * .gitignore: New file, Stefan Monnier, 2020/11/28
- [elpa] externals/url-http-ntlm a55ae6c 01/42: url-http-ntlm: New package, Stefan Monnier, 2020/11/28
- [elpa] externals/url-http-ntlm 9c79150 02/42: url-http-ntlm: Remove trailing whitespace, Stefan Monnier, 2020/11/28
- [elpa] externals/url-http-ntlm 530faf7 04/42: url-http-ntlm: Wrap lines at column 80,
Stefan Monnier <=
- [elpa] externals/url-http-ntlm 722e32f 05/42: url-http-ntlm: Fix checkdoc errors, Stefan Monnier, 2020/11/28
- [elpa] externals/url-http-ntlm dd393b8 12/42: url-http-ntlm: Use url-http-ntlm namespace consistently, Stefan Monnier, 2020/11/28
- [elpa] externals/url-http-ntlm 5c47391 13/42: url-http-ntlm.el (url-ntlm-auth): Move defun near end of file, Stefan Monnier, 2020/11/28
- [elpa] externals/url-http-ntlm 0dad577 08/42: url-http-ntlm.el: Update copyright owner and years, Stefan Monnier, 2020/11/28
- [elpa] externals/url-http-ntlm 9813aea 19/42: url-http-ntlm: Prevent infinite loops, Stefan Monnier, 2020/11/28
- [elpa] externals/url-http-ntlm be85e0a 21/42: url-http-ntlm: Declare url-http-extra-headers special, Stefan Monnier, 2020/11/28
- [elpa] externals/url-http-ntlm 790fbd3 25/42: url-http-ntlm: Change spelling of authorization function, Stefan Monnier, 2020/11/28
- [elpa] externals/url-http-ntlm 2aed8ca 22/42: url-http-ntlm: Autoload url-ntlm-auth and its registration, Stefan Monnier, 2020/11/28
- [elpa] externals/url-http-ntlm c2db685 28/42: url-http-ntlm: Add `url-debug' debugging messages, Stefan Monnier, 2020/11/28
- [elpa] externals/url-http-ntlm 544d008 27/42: url-http-ntlm: Shorten first line of some docstrings, Stefan Monnier, 2020/11/28