[gnus git] branch tzz-auth-source-rewrite updated: =1= Add Secrets API search examples.
Julien Danjou <[email protected]>
| Newsgroups | gmane.emacs.gnus.cvs |
|---|---|
| Message-ID | <[email protected]> |
via 2ca6fd5f1e5030daa73daac8a0a24bf8d0146962 (commit)
from 1f31f2b6986816833f41e160b19f7f11a2e8be1f (commit)
- Log -----------------------------------------------------------------
commit 2ca6fd5f1e5030daa73daac8a0a24bf8d0146962
Author: Ted Zlatanov <[email protected]>
Date: Sun Feb 6 11:30:40 2011 -0600
Add Secrets API search examples.
* auth-source.el (auth-source-secrets-search): Add examples.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d7cc274..8261c39 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
+2011-02-06 Teodor Zlatanov <[email protected]>
+
+ * auth-source.el (auth-source-secrets-search): Add examples.
+
2011-02-06 Julien Danjou <[email protected]>
* message.el (message-setup-1): Handle message-generate-headers-first
diff --git a/lisp/auth-source.el b/lisp/auth-source.el
index f7b5591..0283233 100644
--- a/lisp/auth-source.el
+++ b/lisp/auth-source.el
@@ -862,6 +862,7 @@ See `auth-source-search' for details on SPEC."
;;; (let ((auth-sources '(default))) (auth-source-search :max 1 :delete t))
;;; (let ((auth-sources '(default))) (auth-source-search :max 1))
;;; (let ((auth-sources '("secrets:login"))) (auth-source-search :max 1))
+;;; (let ((auth-sources '("secrets:login"))) (auth-source-search :max 1 :signon_realm "https://git.gnus.org/Git"))
(defun* auth-source-secrets-search (&rest
spec
@@ -879,7 +880,25 @@ matching, do a wider search and narrow it down yourself.
You'll get back all the properties of the token as a plist.
-TODO: Example."
+Here's an example that looks for the first item in the 'login'
+Secrets collection:
+
+ \(let ((auth-sources '(\"secrets:login\")))
+ (auth-source-search :max 1)
+
+Here's another that looks for the first item in the 'login'
+Secrets collection whose label contains 'gnus':
+
+ \(let ((auth-sources '(\"secrets:login\")))
+ (auth-source-search :max 1 :label \"gnus\")
+
+And this one looks for the first item in the 'login' Secrets
+collection that's a Google Chrome entry for the git.gnus.org site
+login:
+
+ \(let ((auth-sources '(\"secrets:login\")))
+ (auth-source-search :max 1 :signon_realm \"https://git.gnus.org/Git\"))
+"
;; TODO
(assert (not create) nil
@@ -1035,6 +1054,7 @@ MODE can be \"login\" or \"password\"."
(when (member "login" mode)
(push (funcall (plist-get :user choice)) found)))
(setq found (if listy found (car-safe found)))))
+
found))
(provide 'auth-source)
-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.
Summary of changes:
lisp/ChangeLog | 4 ++++
lisp/auth-source.el | 22 +++++++++++++++++++++-
2 files changed, 25 insertions(+), 1 deletions(-)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".
The branch, tzz-auth-source-rewrite has been updated
hooks/post-receive
--
Gnus Project