annotate lisp/gnus/auth-source.el @ 92999:a831e708e37e

*** empty log message ***
author Kenichi Handa <handa@m17n.org>
date Sun, 16 Mar 2008 01:54:07 +0000
parents d3767aa9ae49
children a789a1138b08
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
92694
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
1 ;;; auth-source.el --- authentication sources for Gnus and Emacs
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
2
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
3 ;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
4 ;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
5
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
6 ;; Author: Ted Zlatanov <tzz@lifelogs.com>
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
7 ;; Keywords: news
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
8
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
9 ;; This file is part of GNU Emacs.
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
10
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
11 ;; GNU Emacs is free software; you can redistribute it and/or modify
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
12 ;; it under the terms of the GNU General Public License as published by
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
13 ;; the Free Software Foundation; either version 3, or (at your option)
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
14 ;; any later version.
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
15
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
16 ;; GNU Emacs is distributed in the hope that it will be useful,
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
19 ;; GNU General Public License for more details.
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
20
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
21 ;; You should have received a copy of the GNU General Public License
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
23 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
24 ;; Boston, MA 02110-1301, USA.
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
25
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
26 ;;; Commentary:
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
27
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
28 ;; This is the auth-source.el package. It lets users tell Gnus how to
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
29 ;; authenticate in a single place. Simplicity is the goal. Instead
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
30 ;; of providing 5000 options, we'll stick to simple, easy to
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
31 ;; understand options.
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
32 ;;; Code:
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
33
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
34 (eval-when-compile (require 'cl))
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
35
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
36 (defgroup auth-source nil
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
37 "Authentication sources."
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
38 :version "22.1"
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
39 :group 'gnus)
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
40
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
41 (defcustom auth-source-choices nil
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
42 "List of authentication sources.
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
43
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
44 Each entry is the authentication type with optional properties."
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
45 :group 'auth-source
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
46 :type '(repeat :tag "Authentication Sources"
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
47 (cons :tag "Source definition"
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
48 (group :tag "Select a source" :inline t
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
49 (const :format "" :value :source)
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
50 (choice :tag "Authentication information"
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
51 (const :tag "None" nil)
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
52 (file :tag "File")))
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
53 (checklist :tag "Options" :greedy t
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
54 (group :inline t
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
55 (choice :tag "Choose the hosts"
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
56 (group :tag "Select host by name" :inline t
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
57 (const :format "" :value :host)
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
58 (string :tag "Host name"))
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
59 (group :tag "Select host by regular expression" :inline t
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
60 (const :format "" :value :host-regex)
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
61 (regexp :tag "Host regular expression"))
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
62 (group :tag "Use any host" :inline t
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
63 (const :format "" :value :host-any)
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
64 (const :tag "Any" t))
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
65 (group :tag "Use if no other host matches" :inline t
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
66 (const :tag "Fallback" nil))))
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
67 (group :tag "Choose the protocol" :inline t
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
68 (const :format "" :value :protocol)
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
69 (choice :tag "Protocol"
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
70 (const :tag "Any" t)
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
71 (const :tag "Fallback (used if no others match)" nil)
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
72 (const :tag "IMAP" imap)
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
73 (const :tag "POP3" pop3)
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
74 (const :tag "SSH" ssh)
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
75 (const :tag "SFTP" sftp)
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
76 (const :tag "SMTP" smtp)))))))
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
77
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
78 ;; temp for debugging
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
79 ;; (customize-variable 'auth-source-choices)
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
80 ;; (setq auth-source-choices nil)
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
81 ;; (format "%S" auth-source-choices)
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
82
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
83 (provide 'auth-source)
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
84
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
85 ;; arch-tag: ff1afe78-06e9-42c2-b693-e9f922cbe4ab
d3767aa9ae49 Merge from gnus--devo--0
Miles Bader <miles@gnu.org>
parents:
diff changeset
86 ;;; auth-source.el ends here