[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 9e52a39 04/32: url-http-ntlm: Wrap lines at column 80
From: |
Thomas Fitzsimmons |
Subject: |
[elpa] master 9e52a39 04/32: url-http-ntlm: Wrap lines at column 80 |
Date: |
Thu, 18 Feb 2016 03:26:52 +0000 |
branch: master
commit 9e52a39f0e6a087f2a1959bc8f73f38b77a70704
Author: Thomas Fitzsimmons <address@hidden>
Commit: Thomas Fitzsimmons <address@hidden>
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.
---
packages/url-http-ntlm/url-http-ntlm.el | 46 ++++++++++++++++++-------------
1 files changed, 27 insertions(+), 19 deletions(-)
diff --git a/packages/url-http-ntlm/url-http-ntlm.el
b/packages/url-http-ntlm/url-http-ntlm.el
index 7488416..1e4e7bc 100644
--- a/packages/url-http-ntlm/url-http-ntlm.el
+++ b/packages/url-http-ntlm/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 <address@hidden> wrote ntlm.el and md4.el, which are parts
of FLIM
-;; (Faithful Library about Internet Message).
+;; Taro Kawagishi <address@hidden> 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] master updated (1fc71ba -> 6682a04), Thomas Fitzsimmons, 2016/02/17
- [elpa] master ecee87e 01/32: url-http-ntlm: New package, Thomas Fitzsimmons, 2016/02/17
- [elpa] master 087d353 02/32: url-http-ntlm: Remove trailing whitespace, Thomas Fitzsimmons, 2016/02/17
- [elpa] master 0bbbe59 03/32: url-http-ntlm.el: Adjust blank lines, Thomas Fitzsimmons, 2016/02/17
- [elpa] master 9e52a39 04/32: url-http-ntlm: Wrap lines at column 80,
Thomas Fitzsimmons <=
- [elpa] master 0799c67 05/32: url-http-ntlm: Fix checkdoc errors, Thomas Fitzsimmons, 2016/02/17
- [elpa] master 8482b90 06/32: url-http-ntlm: Remove blank comment lines, Thomas Fitzsimmons, 2016/02/17
- [elpa] master 50656c4 07/32: url-http-ntlm.el: Reindent whole file, Thomas Fitzsimmons, 2016/02/17
- [elpa] master cec4982 08/32: url-http-ntlm.el: Update copyright owner and years, Thomas Fitzsimmons, 2016/02/17
- [elpa] master 2d39d5d 09/32: url-http-ntlm.el: Add maintainer header, Thomas Fitzsimmons, 2016/02/17
- [elpa] master 3033c48 10/32: url-http-ntlm.el: Update installation instructions, Thomas Fitzsimmons, 2016/02/17
- [elpa] master 19e93aa 11/32: url-http-ntlm.el: Update author's email address, Thomas Fitzsimmons, 2016/02/17
- [elpa] master 6fb3a70 12/32: url-http-ntlm: Use url-http-ntlm namespace consistently, Thomas Fitzsimmons, 2016/02/17
- [elpa] master 4128f4f 13/32: url-http-ntlm.el (url-ntlm-auth): Move defun near end of file, Thomas Fitzsimmons, 2016/02/17
- [elpa] master 55e7f42 14/32: url-http-ntlm.el (url-http-ntlm-last-args): Group defvar with others, Thomas Fitzsimmons, 2016/02/17