[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 063375e0ed 1/2: Update for the recent change
From: |
Sam Steingold |
Subject: |
master 063375e0ed 1/2: Update for the recent change |
Date: |
Mon, 10 Jan 2022 20:53:07 -0500 (EST) |
branch: master
commit 063375e0ed6a9e06c002744384686defeebd0bf2
Author: Sam Steingold <sds@gnu.org>
Commit: Sam Steingold <sds@gnu.org>
Update for the recent change
* doc/misc/auth.texi (Help for developers): Document
'auth-source-pick-first-password' and 'auth-info-password'.
Update the 'auth-source-search' example.
---
doc/misc/auth.texi | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/doc/misc/auth.texi b/doc/misc/auth.texi
index b28ae247ea..c2a9aa4437 100644
--- a/doc/misc/auth.texi
+++ b/doc/misc/auth.texi
@@ -579,10 +579,7 @@ from Gnus's @code{nnimap.el}.
:create t))))
(if found
(list (plist-get found :user)
- (let ((secret (plist-get found :secret)))
- (if (functionp secret)
- (funcall secret)
- secret))
+ (auth-info-password found)
(plist-get found :save-function))
nil)))
@end example
@@ -602,7 +599,7 @@ Later, after a successful login, @code{nnimap.el} calls the
@example
(when (functionp (nth 2 credentials))
- (funcall (nth 2 credentials)))
+ (funcall (nth 2 credentials)))
@end example
This will work whether the @code{:save-function} was provided or not.
@@ -637,6 +634,16 @@ This function forgets any cached data matching @var{spec}.
It returns the number of items forgotten.
@end defun
+@defun auth-source-pick-first-password &rest spec
+This function returns the password of the first record found by
+applying @code{auth-source-search} to @var{spec}.
+@end defun
+
+@defun auth-info-password auth-info
+This function extracts the password string from the @var{auth-info}
+record.
+@end defun
+
@node GnuPG and EasyPG Assistant Configuration
@appendix GnuPG and EasyPG Assistant Configuration