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: Thierry Volpiatto
Subject: Re: authentification with url-retrieve
Date: Fri, 16 Jan 2009 10:21:47 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Hi Ted and all,

Thierry Volpiatto <address@hidden> writes:

> Hi Ted!
> Thank you very much for your precious indications.
> I will try that tomorrow and tell you how it worked.
>
> Ted Zlatanov <address@hidden> writes:
>
>> On Thu, 15 Jan 2009 10:39:19 +0100 Thierry Volpiatto <address@hidden> 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)

(epa-file-mode) seem to be deprecated, i have here (epa-file-enable).

>> ;; (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

Here the line i use for https:

,----
| machine api.del.icio.us:443 port https login xxx password xxxx
`----

>> ;;; 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)))


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

and without encryption (don't encrypt .authinfo):

,----
| (setq auth-sources '((:source "~/.authinfo" :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.

i tried auth-sources and it worked fine. :)
Thank you.
I use actually wget and curl to retrieve https url, i think i will use
url-retrieve in next version of anything-delicious.el, even for deleting
and renaming bookmarks.

When i use encryption, (epa settings) i am prompt two times for
passphrase, is it normal?

-- 
A + Thierry Volpiatto
Location: Saint-Cyr-Sur-Mer - France





reply via email to

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