Gnus development mailing list
 help / color / mirror / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
To: ding@gnus.org
Subject: Re: [gnus git] Add ~/.authinfo to the default, since that's probably most useful for users.
Date: Mon, 20 Sep 2010 10:26:13 -0500	[thread overview]
Message-ID: <87wrqgfnca.fsf@lifelogs.com> (raw)
In-Reply-To: <pknbp7szng5.fsf@gmail.com>

On Mon, 20 Sep 2010 13:03:38 +0200 Robert Pluim <rpluim@gmail.com> wrote: 

RP> Apropos, I have a ~/.authinfo which contains

RP> machine myimapserver login myusername port imap

RP> machine myimapserver login myusername port 993

RP> machine myimapserver login myusername port imaps

RP> And I *still* get prompted for both my username and password when
RP> connecting to imap. What magic incantation am I missing? (and no, I'm
RP> not going to be putting my password in that file).

It assumes you have both or neither in the file.  Can you try this
version of nnimap-credentials (press `C-x C-e' after the closing
parenthesis)?

(defun nnimap-credentials (address ports)
  (let (port credentials)
    ;; Request the credentials from all ports, but only query on the
    ;; last port if all the previous ones have failed.
    (while (and (null credentials)
		(setq port (pop ports)))
      (setq credentials
	    (or
             (auth-source-user-or-password
              '("login" "password") address port nil (null ports))
             (auth-source-user-or-password
              '("login") address port nil (null ports)))))
    credentials))

I don't think the general solution is to return ("myusername" nil) in
such cases.  It seems to me that if the application asks for two
authentication tokens, it expects them both to be valid.

Thanks
Ted




  parent reply	other threads:[~2010-09-20 15:26 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1OwjUu-0007Om-00@quimby.gnus.org>
2010-09-18  6:19 ` Ted Zlatanov
2010-09-18 11:47   ` Lars Magne Ingebrigtsen
2010-09-20  2:30     ` Ted Zlatanov
2010-09-20  8:14       ` Lars Magne Ingebrigtsen
2010-09-20 15:03         ` Ted Zlatanov
2010-09-25 12:47           ` Gijs Hillenius
2010-09-25 13:56             ` Lars Magne Ingebrigtsen
2010-09-25 15:12             ` Ted Zlatanov
     [not found]               ` <87mxr46gv9.fsf@hillenius.net>
2010-09-26 12:27                 ` Ted Zlatanov
2010-09-26 12:38                   ` tls.el I added '--insecure' (Was :Re: [gnus git] Add ~/.authinfo to the default, since that's probably most useful for users.) Gijs Hillenius
2010-09-26 20:53                     ` tls.el I added '--insecure' Ted Zlatanov
2010-09-20 10:47       ` [gnus git] Add ~/.authinfo to the default, since that's probably most useful for users Sebastian Krause
2010-09-20 14:59         ` Ted Zlatanov
2010-09-20 18:40           ` Michael Albinus
2010-09-20 14:27       ` Richard Riley
2010-09-20 15:01         ` Ted Zlatanov
2010-09-20 15:29           ` Richard Riley
2010-09-18 12:50   ` Sebastian Krause
2010-09-18 15:40     ` Lars Magne Ingebrigtsen
2010-09-18 21:29       ` Sebastian Krause
2010-09-18 21:31         ` Lars Magne Ingebrigtsen
2010-09-20 11:03   ` Robert Pluim
2010-09-20 14:10     ` Richard Riley
2010-09-20 14:59       ` Robert Pluim
2010-09-20 15:26     ` Ted Zlatanov [this message]
2010-09-20 15:43       ` Tibor Simko
2010-09-20 15:53       ` Robert Pluim
2010-09-21 16:19       ` Lars Magne Ingebrigtsen

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

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

  git send-email \
    --in-reply-to=87wrqgfnca.fsf@lifelogs.com \
    --to=tzz@lifelogs.com \
    --cc=ding@gnus.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.
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 NNTP newsgroup(s).