aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/gnus/auth-source.el
diff options
context:
space:
mode:
authorMiles Bader2008-03-10 00:50:22 +0000
committerMiles Bader2008-03-10 00:50:22 +0000
commit8f7abae3a9c0dcb827f50688e802d634c7461ece (patch)
treefb3d3a87b3fef4ddb3e308aa57c378f424a2dc18 /lisp/gnus/auth-source.el
parent390b81fa98fa581afe965a2943d81d7dd07f0dc5 (diff)
downloademacs-8f7abae3a9c0dcb827f50688e802d634c7461ece.tar.gz
emacs-8f7abae3a9c0dcb827f50688e802d634c7461ece.zip
Merge from gnus--devo--0
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1097
Diffstat (limited to 'lisp/gnus/auth-source.el')
-rw-r--r--lisp/gnus/auth-source.el86
1 files changed, 86 insertions, 0 deletions
diff --git a/lisp/gnus/auth-source.el b/lisp/gnus/auth-source.el
new file mode 100644
index 00000000000..116d8b4a6a1
--- /dev/null
+++ b/lisp/gnus/auth-source.el
@@ -0,0 +1,86 @@
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
44Each 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