(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
"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")
(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
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)
"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)
(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)