unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Edward O'Connor" <hober0@gmail.com>
To: emacs-devel@gnu.org
Subject: How to non-interactively provide auth info to URL, and how to force  URL to use HTTP AUTH
Date: Tue, 15 Dec 2009 12:02:08 -0800	[thread overview]
Message-ID: <3b31caf90912151202j7dc91abat65e21a11aa636ef0@mail.gmail.com> (raw)

Hi,

I've made a lot of use out of url.el over the years, and it's for the
most part been a nice experience. But I haven't been able to wrap my
brain around how to use HTTP AUTH in a nice-to-the-user way.

Here's the scenario: I work on several elisp clients for various APIs
which are exposed via HTTP and make use of HTTP AUTH. When a developer
uses my library, they supply the relevant auth info to my library
explicitly. I would then like to invoke url-retreive and have the
resulting request use basic (or digest) auth with the auth info I
already have, *without prompting the user* for a username or password. I
keep failing to figure out how to do this.

I'd really rather not resort to shelling out to curl, but this is *very
easy* to do with curl (a simple "curl -u user:pass url-to-api-call" will
do), and it's not at all clear how to do it with url.el.

Any suggestions on how to proceed would be most welcome!


Thanks,
Ted




             reply	other threads:[~2009-12-15 20:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-15 20:02 Edward O'Connor [this message]
2009-12-16  0:36 ` How to non-interactively provide auth info to URL, and how to force URL to use HTTP AUTH Juri Linkov
2009-12-16  8:56   ` Andreas Schwab
2009-12-16  6:30 ` Ari Roponen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3b31caf90912151202j7dc91abat65e21a11aa636ef0@mail.gmail.com \
    --to=hober0@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).