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