Set up autoloads. Bump to 23.2 because of the
authorTeodor Zlatanov <tzz@lifelogs.com>
Sat, 20 Mar 2010 20:35:24 +0000 (20:35 +0000)
committerTeodor Zlatanov <tzz@lifelogs.com>
Sat, 20 Mar 2010 20:35:24 +0000 (20:35 +0000)
secrets.el dependency.
(auth-sources): Add optional user name.  Add secrets.el configuration
choice (unused right now).

lisp/ChangeLog
lisp/auth-source.el

index e5b22b0..38e04aa 100644 (file)
@@ -1,3 +1,10 @@
+2010-03-20  Teodor Zlatanov  <tzz@lifelogs.com>
+
+       * auth-source.el: Set up autoloads.  Bump to 23.2 because of the
+       secrets.el dependency.
+       (auth-sources): Add optional user name.  Add secrets.el configuration
+       choice (unused right now).
+
 2010-03-20  Teodor Zlatanov  <tzz@lifelogs.com>
 
        * gnus-sum.el (gnus-summary-make-menu-bar): Let
index 284e6e9..5a628d0 100644 (file)
 (eval-when-compile (require 'cl))
 (eval-when-compile (require 'netrc))
 
+(autoload 'secrets-search-items "secrets")
+(autoload 'secrets-get-alias "secrets")
+(autoload 'secrets-get-attribute "secrets")
+
 (defgroup auth-source nil
   "Authentication sources."
   :version "23.1" ;; No Gnus
@@ -49,7 +53,7 @@
   "List of authentication protocols and their names"
 
   :group 'auth-source
-  :version "23.1" ;; No Gnus
+  :version "23.2" ;; No Gnus
   :type '(repeat :tag "Authentication Protocols"
                 (cons :tag "Protocol Entry"
                       (symbol :tag "Protocol")
@@ -71,7 +75,7 @@
 (defcustom auth-source-do-cache t
   "Whether auth-source should cache information."
   :group 'auth-source
-  :version "23.1" ;; No Gnus
+  :version "23.2" ;; No Gnus
   :type `boolean)
 
 (defcustom auth-source-debug nil
@@ -85,7 +89,7 @@ If the value is t, debug messages are logged with `message'.
 If the value is a function, debug messages are logged by calling
  that function using the same arguments as `message'."
   :group 'auth-source
-  :version "23.1" ;; No Gnus
+  :version "23.2" ;; No Gnus
   :type        `(choice 
          :tag "auth-source debugging mode"
          (const :tag "Log using `message' to the *Messages* buffer" t)
@@ -96,19 +100,32 @@ If the value is a function, debug messages are logged by calling
   "Whether auth-source should hide passwords in log messages.
 Only relevant if `auth-source-debug' is not nil."
   :group 'auth-source
-  :version "23.1" ;; No Gnus
+  :version "23.2" ;; No Gnus
   :type `boolean)
 
-(defcustom auth-sources '((:source "~/.authinfo.gpg" :host t :protocol t))
+(defcustom auth-sources '((:source "~/.authinfo.gpg" :host t :protocol t nil))
   "List of authentication sources.
 
-Each entry is the authentication type with optional properties."
+Each entry is the authentication type with optional properties.
+
+It's best to customize this with `M-x customize-variable' because the choices
+can get pretty complex."
   :group 'auth-source
-  :version "23.1" ;; No Gnus
+  :version "23.2" ;; No Gnus
   :type `(repeat :tag "Authentication Sources"
                 (list :tag "Source definition"
                       (const :format "" :value :source)
-                      (string :tag "Authentication Source")
+                      (choice :tag "Authentication backend choice"
+                              (string :tag "Authentication Source (file)")
+                              (list :tag "secrets.el (Secret Service API/KWallet/GNOME KeyRing)" 
+                                     (const :format "" :value :secrets)
+                                     (choice :tag "Collection to use"
+                                             (string :tag "Collection name")
+                                             (const :tag "Default" 'default)
+                                             (const :tag "Any" t)
+                                             (const :tag "Temporary" "session")
+                                             (string :tag "Specific session name")
+                                             (const :tag "Fallback" nil))))
                       (const :format "" :value :host)
                       (choice :tag "Host (machine) choice"
                               (const :tag "Any" t)
@@ -118,7 +135,15 @@ Each entry is the authentication type with optional properties."
                       (choice :tag "Protocol"
                               (const :tag "Any" t)
                               (const :tag "Fallback" nil)
-                              ,@auth-source-protocols-customize))))
+                              ,@auth-source-protocols-customize)
+                      (repeat :tag "Extra Parameters"
+                              (choice :tag "Extra parameter"
+                                      (list :tag "Preferred username"
+                                            (const :format "" :value :preferred-username)
+                                            (choice :tag "Personality or username"
+                                                    (const :tag "Any" t)
+                                                    (const :tag "Fallback" nil)
+                                                    (string :tag "Specific user name"))))))))
 
 ;; temp for debugging
 ;; (unintern 'auth-source-protocols)