Gnus development mailing list
 help / color / mirror / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
To: ding@gnus.org
Subject: auth-source.el rewrite (was: auth-source tokens)
Date: Mon, 24 Jan 2011 11:27:35 -0600	[thread overview]
Message-ID: <87bp36dxfc.fsf_-_@lifelogs.com> (raw)
In-Reply-To: <87pqu6vajx.fsf@gmx.de>

[-- Attachment #1: Type: text/plain, Size: 1798 bytes --]

On Mon, 15 Nov 2010 17:03:30 +0100 Michael Albinus <michael.albinus@gmx.de> wrote: 

MA> Ted Zlatanov <tzz@lifelogs.com> writes:
>> OK, final revision I hope...  Note all backends will just throw an error
>> rather than changing the return value when creation fails.  I think
>> that's the least surprising behavior.

MA> I'm OK with this. The auth-sources info pages might show some examples,
MA> though.

Attached is a version of auth-source.el I finally did over the weekend
that implements:

1) defclass auth-source-backend (using eioio) which gives us a lot of
flexibility, including the ability to let users customize the backends
directly.

2) accepts auth-sources in the format '("~/.authinfo.gpg" "~/.authinfo")
and the other ones that Customize can produce through the function
auth-source-backend-parse

3) auth-source-search (the documentation is mostly unchanged, except for
"You probably want at least a :secret property if you specify
:create.").  It returns early if :max is set.

4) netrc backend: auth-source-netrc-parse, auth-source-netrc-normalize,
auth-source-netrc-search; not done: auth-source-netrc-create.  This
removes the dependency on netrc.el and simplifies things a bit.  Note
the alist-to-plist rewrite and key aliasing are done in
auth-source-netrc-normalize.  I didn't want to rewrite
auth-source-netrc-parse too much from the starting point of
netrc-parse.  Also note the :secret key is a function now and clients
have to expect that.  I think that's a good thing.

Everything after 

;;; older API

is unchanged from before and will probably be rewritten.

Look it over and let me know what you think.  I'm still not sure how the
creation should work exactly and hope you will tell me how the rewrite
"feels," especially considered against the Secrets API.

Ted


[-- Attachment #2: auth-source.el --]
[-- Type: application/emacs-lisp, Size: 37306 bytes --]

  reply	other threads:[~2011-01-24 17:27 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-25  2:59 nnimap-username Daiki Ueno
2010-10-25  6:33 ` nnimap-username Reiner Steib
2010-10-25  7:13   ` nnimap-username Daiki Ueno
2010-10-25 18:09     ` auth-source tokens (was: nnimap-username) Ted Zlatanov
2010-10-26 16:56       ` auth-source tokens Ted Zlatanov
2010-10-29  8:04         ` Michael Albinus
2010-10-29 22:15         ` Lars Magne Ingebrigtsen
2010-11-11 16:22           ` Ted Zlatanov
2010-11-14 17:24             ` Michael Albinus
2010-11-15  0:59               ` Ted Zlatanov
2010-11-15  4:47                 ` Michael Albinus
2010-11-15 15:14                   ` Ted Zlatanov
2010-11-15 16:03                     ` Michael Albinus
2011-01-24 17:27                       ` Ted Zlatanov [this message]
2011-01-24 23:36                         ` auth-source.el rewrite Lars Ingebrigtsen
2011-01-25 16:59                           ` Ted Zlatanov
2011-01-25 21:09                             ` Michael Albinus
2011-01-25 21:42                               ` Ted Zlatanov
2011-01-26  8:32                                 ` Michael Albinus
2011-01-26 17:03                                   ` Ted Zlatanov
2011-01-26 19:35                                     ` Michael Albinus
2011-01-26 20:35                                       ` Ted Zlatanov
2011-01-26 22:15                                         ` Ted Zlatanov
2011-01-27 16:49                                           ` Michael Albinus
2011-01-27 20:20                                             ` Ted Zlatanov
2011-01-29 14:11                                               ` Michael Albinus
2011-01-31  2:49                                                 ` Ted Zlatanov
2011-01-31 14:30                                                   ` Michael Albinus
2011-01-31 17:09                                                     ` Ted Zlatanov
2011-01-27 12:35                                         ` Michael Albinus

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=87bp36dxfc.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).