help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: authentification with url-retrieve


From: Ted Zlatanov
Subject: Re: authentification with url-retrieve
Date: Thu, 15 Jan 2009 11:34:43 -0600
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux)

On Thu, 15 Jan 2009 10:39:19 +0100 Thierry Volpiatto 
<thierry.volpiatto@gmail.com> wrote: 

TV> Is some body knowing how to pass login and password to 
TV> url-retrieve/synchronously when doing an https request? 
TV> (without prompt)

TV> url-auth.el is not very well documented.

Through auth-source you can do:
(from the comments section, to be put into the manual eventually)

;; Easy setup:
;; (require 'auth-source)
;; (customize-variable 'auth-sources) ;; optional

;; now, whatever sources you've defined for password have to be available

;; if you want encrypted sources, which is strongly recommended, do
;; (require 'epa-file)
;; (epa-file-mode)
;; (setq epa-file-cache-passphrase-for-symmetric-encryption t) ; VERY important

;; before you put some data in ~/.authinfo.gpg (the default place)

;;; For url-auth authentication (HTTP/HTTPS), you need to use:

;;; machine yourmachine.com:80 port http login testuser password testpass

;;; This will match any realm and authentication method (basic or
;;; digest).  If you want finer controls, explore the url-auth source
;;; code and variables.

I would recommend just this for auth-sources:

(setq auth-sources ((:source "~/.authinfo.gpg" :host t :protocol t)))

Let me know if this works for you.  The idea of auth-sources is so you
don't have to customize 20 places with user names and passwords, so it
works for things like Gnus passwords and Tramp as well.

Ted


reply via email to

[Prev in Thread] Current Thread [Next in Thread]