@menu
* Overview:: auth-source \e$B%i%$%V%i%j!<$N35MW\e(B
* Help for users::
+* Secret Service API::
* Help for developers::
* Index::
* Function Index::
@chapter \e$B35MW\e(B
auth-source \e$B%i%$%V%i%j!<$O!"!V%5!<%P!<L>$H%]!<%H$O$o$+$C$F$k$s$@$1$I!"%f!<\e(B
-\e$B%6!<L>$H%Q%9%o!<%I$O2?$@$C$1\e(B?\e$B!W$H$$$&@N$J$,$i$NG.Nu$JLd$$$X$NEz$r8+$D$1\e(B
-\e$B$k$?$a$N!"\e(BEmacs \e$B$H\e(B Gnus \e$BMQ$N?t$"$kC1=c$J<jCJ$N0l$D$G$9!#\e(B
+\e$B%6!<L>$H%Q%9%o!<%I$O2?$@$C$1\e(B?\e$B!W$H$$$&@N$J$,$i$NG.Nu$JLd$$$KEz$($k$?$a$N!"\e(B
+Emacs \e$B$H\e(B Gnus \e$BMQ$N?t$"$kC1=c$J<jCJ$N0l$D$G$9!#\e(B
-\e$B<B:]$K$O\e(B auth-source \e$B%i%$%V%i%j!<$OC1$J$k%f!<%6!<L>\e(B (\e$B$$$o$f$k\e(B login) \e$B$H\e(B
+\e$B<B:]$K$O\e(B auth-source \e$B%i%$%V%i%j!<$OC1$J$k%f!<%6!<L>\e(B (\e$B$$$o$f$k\e(B login) \e$B$d\e(B
\e$B%Q%9%o!<%I0J30$N$b$N$b07$&$3$H$,$G$-$^$9$,!":#F|$N\e(B Emacs \e$B$H\e(B Gnus \e$B$G$O$=\e(B
-\e$B$l$i\e(B 2\e$B$D$@$1$,;H$o$l$F$$$^$9!#F1MM$K!"\e(Bauth-source \e$B%i%$%V%i%j!<$OM}O@E*$K\e(B
-\e$B$OB?$/$N5-O?7A<0$r07$&$3$H$,$G$-$^$9$,!":#$N$H$3$mEAE}E*$J\e(B ``netrc'' \e$B7A\e(B
-\e$B<0\e(B (\e$B$3$NJ8=q$N8e$NJ}$K$"$j$^$9\e(B) \e$B$7$+M}2r$7$^$;$s!#\e(B
+\e$B$l$i\e(B 2\e$B$D$@$1$,;H$o$l$F$$$^$9!#F1MM$K\e(B auth-source \e$B%i%$%V%i%j!<$OB?$/$N5-\e(B
+\e$BO?7A<0!"8=:_$OEAE}E*$J\e(B ``netrc'' \e$B7A<0\e(B (\e$B$3$NJ8=q$N8e$NJ}$K$"$j$^$9\e(B) \e$B$^$?\e(B
+\e$B$O%7!<%/%l%C%H%5!<%S%9\e(B API \e$B$r%5%]!<%H$7$^$9!#\e(B
@node Help for users
@chapter \e$BMxMQ<T$N$?$a$N%X%k%W\e(B
@defvar auth-sources
@code{auth-sources} \e$BJQ?t$O!"8D!9$N%[%9%H$H%W%m%H%3%k$N$?$a$N\e(B netrc \e$B%U%!\e(B
-\e$B%$%k$,$I$3$K:_$k$+$r\e(B auth-source \e$B%i%$%V%i%j!<$KCN$i$;$^$9!#9%$_$K1~$8$F\e(B
-\e$B$I$&$K$G$b$G$-$^$9$,!"%G%#%U%)%k%H$N:G$b4J7i$J@_Dj$O<!$NDL$j$G$9\e(B:
+\e$B%$%k$^$?$O%7!<%/%l%C%H%5!<%S%9\e(B API \e$B$N<}=8J*$,$I$3$K:_$k$+\e(B
+\e$B$r\e(B auth-source \e$B%i%$%V%i%j!<$KCN$i$;$^$9!#9%$_$K1~$8$F$I$&$K$G$b$G$-$^$9\e(B
+\e$B$,!"%G%#%U%)%k%H$N:G$b4J7i$J@_Dj$O<!$NDL$j$G$9\e(B:
@lisp
+;;; \e$B5l%G%#%U%)%k%H\e(B: :host \e$B$H\e(B :protocol \e$B$,I,MW$@$C$?$,!"$b$O$dITMW!#\e(B
(setq auth-sources '((:source "~/.authinfo.gpg" :host t :protocol t)))
+;;; \e$B$[$\Ey2A$@$,!"$h$jC;$$\e(B (\e$B8e=R$N\e(B fallback \e$B$K$D$$$F$N5-=R$r;2>H\e(B)\e$B!#\e(B
+(setq auth-sources '((:source "~/.authinfo.gpg")))
@end lisp
\e$B$3$l$O!V$I$s$J%[%9%H$N$I$N%]!<%H$G$b!"$3$NC10l$N%U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!":.:_$9$k\e(B 2\e$B$D$N%=!<%9$r;H$&Nc$G$9\e(B:
+
+@lisp
+(setq auth-sources '((:source (:secrets default) :host "myserver" :user "joe")
+ (:source "~/.authinfo.gpg")))
+@end lisp
+
+\e$B:GA1$N9gCW$O!"=i2s$NAv::$@$1$G\e(B (\e$B2<$+$i;O$^$k\e(B) \e$B=g=x$K$h$C$F7hDj$5$l$^\e(B
+\e$B$9\e(B (\e$B3FMWAG$O87L)$K>H9g$5$l$^$9\e(B)\e$B!#>e$NNc$G$O!"=i2s$NAv::$G%[%9\e(B
+\e$B%H\e(B @code{myserver} \e$B$X$NC10l$N9gCW$r8+$D$1$k$G$7$g$&!#\e(BNetrc \e$BA*Br$G$O!"$=\e(B
+\e$B$l$,$I$s$J%[%9%H$d%W%m%H%3%k$K$b0E$K\e(B (@emph{fallback} \e$B$H$7$F\e(B) \e$B9gCW$7$F$7\e(B
+\e$B$^$&$N$G!"<:GT$9$k$G$7$g$&!#\e(B@code{auth-sources} \e$B$K$*$1\e(B
+\e$B$k\e(B @code{:host t} \e$B$N@_DjCM$O!"\e(B@code{:host} \e$B$,L5$$>l9g$H0c$C$F!"=i2s$NAv\e(B
+\e$B::$K$*$1$k9gCW$rL\O@$s$@$b$N$G$"$k$H9MN8$5$l$^$9!#\e(B
+
+\e$B$5$F!"$b$7\e(B ``\e$BL$@_Dj\e(B'' \e$B$N%[%9%H$rC5$=$&$H$9$k$H!"$=$l$O$I$s$J%=!<%9$K$bL@\e(B
+\e$B$i$+$J9gCW$O$7$J$$$G$7$g$&!#\e(B2\e$B2sL\$NAv::\e(B (@emph{fallback} \e$B%Q%9\e(B) \e$B$G$O!"$9\e(B
+\e$B$Y$F$N0EL[$N9gCW$rD4$Y$F!"$=$l$i$r<}=8$7$^$9!#$=$l$i$O%9%3%"IU$1$5$l!"%9\e(B
+\e$B%3%"$K$h$C$FJB$YJQ$($i$l$^$9!#%9%3%"$O!"9gCW$9$kL@<(E*$J%Q%i%a!<%?!<$N?t\e(B
+\e$BCM$K4p$E$$$F$$$^$9!#>\:Y$O\e(B @code{auth-pick} \e$B4X?t$r;2>H$7$F$/$@$5$$!#\e(B
+
+\e$BLuCm\e(B fallback: \e$B$"$kMWAG$,;XDj$5$l$F$$$J$$$?$a$K87L)$J9gCW$,5/$3$i$J$/$F\e(B
+\e$B$b!"$"$k5,B'$K$h$C$FA*Br$9$kL\E*J*!"$"$k$$$OA*Br$9$k$3$H!#\e(B
@end defvar
\e$B$b$7\e(B @code{auth-sources} \e$B$r%+%9%?%^%$%:$7$J$$$H!"%G%#%U%)%k%H$G@83h$9$k\e(B
\e$B$7$^$9!#\e(BTramp \e$B$K$O\e(B 88 \e$B<oN`$N@\B3J}K!$,$"$k$N$G!"JQ$o$C$?@_Dj$,$"$k>l9g$O\e(B
\e$B$3$l$,I,MW$+$b$7$l$^$;$s\e(B (\e$B$=$l$i$K$D$$$F$N0JA0$N%3%a%s%H$r8+$F$/$@$5$$\e(B)\e$B!#\e(B
+@node Secret Service API
+@chapter \e$B%7!<%/%l%C%H%5!<%S%9\e(B API
+
+TODO: \e$B$I$&F/$/$+$r0lHLE*$K!"\e(Bsecrets.el \e$B$O$I$&$d$k$+!"$$$/$D$+$NNc!#\e(B
+
@node Help for developers
@chapter \e$B3+H/<T$N$?$a$N%X%k%W\e(B
auth-source \e$B%i%$%V%i%j!<$K$O!"30It$G;H$&$?$a$N4X?t$O0l$D$7$+$"$j$^$;$s!#\e(B
-@defun auth-source-user-or-password mode host port
-\e$B%[%9%H\e(B @var{host} \e$B$*$h$S%]!<%H\e(B @var{port} \e$B$N$?$a$N\e(B @var{mode} \e$B$G7h$^$k!"\e(B
-\e$BE,@Z$JG'>Z%H!<%/%s$r<h$j9~$_$^$9!#\e(B
-@code{auth-source-debug} \e$B$,\e(B @code{t} \e$B$@$C$?$i%G%P%C%0$N$?$a$N%a%C%;!<%8\e(B
-\e$B$rI=<($7$^$9!#%m%0$r:N$k$?$a$N4X?t$r;H$&$K$O!"\e(B@code{auth-source-debug}
-\e$B$r$=$N4X?t$K@_Dj$7$F$/$@$5$$!#EO$5$l$k%Q%i%a!<%?!<$O\e(B @code{message} \e$B4X?t\e(B
-\e$B$,<u$1<h$k$b$N$HF1$8$G$9!#$D$^$jMM<0;HMQ$NJ8;zNs$HG$0U$N%Q%i%a!<%?!<$G$9!#\e(B
+@defun auth-source-user-or-password mode host port &optional username
+\e$B%[%9%H\e(B @var{host} \e$B$*$h$S%]!<%H\e(B @var{port} \e$B$N$?$a$N\e(B @var{mode} \e$B$G7h$^$kE,\e(B
+\e$B@Z$JG'>Z%H!<%/%s$r<h$j9~$_$^$9!#$b$7\e(B @var{username} \e$B$,M?$($i$l$l$P!"F1MM\e(B
+\e$B$K>H9g$5$l$^$9!#\e(B@code{auth-source-debug} \e$B$,\e(B @code{t} \e$B$@$C$?$i%G%P%C%0$N\e(B
+\e$B$?$a$N%a%C%;!<%8$rI=<($7$^$9!#%m%0$r:N$k$?$a$N4X?t$r;H$&$K$O!"\e(B
+@code{auth-source-debug} \e$B$r$=$N4X?t$K@_Dj$7$F$/$@$5$$!#EO$5$l$k%Q%i%a!<\e(B
+\e$B%?!<$O\e(B @code{message} \e$B4X?t$,<u$1<h$k$b$N$HF1$8$G$9!#$D$^$jMM<0;HMQ$NJ8;z\e(B
+\e$BNs$HG$0U$N%Q%i%a!<%?!<$G$9!#\e(B
\e$B$b$7\e(B @var{mode} \e$B$,J8;zNs$N%j%9%H$J$i$P!"4X?t$OJ8;zNs$N%j%9%H\e(B
-\e$B$+\e(B @code{nil} \e$B$rJV$7$^$9\e(B (\e$B$=$N$?$a!"$b$&\e(B 1\e$B2s\e(B netrc \e$B%U%!%$%k$r2r@O$;$:$K\e(B
-\e$B:Q$_$^$9\e(B)\e$B!#:#$N$H$3$m\e(B ``login'' \e$B$H\e(B ``password'' \e$B$@$1$,G'$a$i$l$F$$$^$9$,!"\e(B
-\e$B>-Mh$O$b$C$HB?$/$N$b$N$,DI2C$5$l$k$G$7$g$&!#\e(B
+\e$B$+\e(B @code{nil} \e$B$rJV$7$^$9\e(B (\e$B$=$N$?$a!"$b$&\e(B 1\e$B2s\e(B netrc \e$B%U%!%$%k$r2r@O$;$:$K!"\e(B
+\e$B$^$?$O%7!<%/%l%C%H%5!<%S%9\e(B API \e$B$r>H9g$;$:$K:Q$_$^$9\e(B)\e$B!#:#$N$H$3\e(B
+\e$B$m\e(B ``login'' \e$B$H\e(B ``password'' \e$B$@$1$,G'$a$i$l$F$$$^$9$,!">-Mh$O$b$C$HB?$/\e(B
+\e$B$N$b$N$,DI2C$5$l$k$G$7$g$&!#\e(B
@var{host} \e$B$O%[%9%HL>$NJ8;zNs$G$9!#\e(B
@var{port} \e$B$O%W%m%H%3%kL>\e(B (\e$BNc$($P\e(B ``imap'') \e$B$^$?$O%]!<%HHV9f$G$9!#%f!<%6!<\e(B
\e$B$N\e(B netrc \e$B%U%!%$%k$K$"$k%]!<%H$KBP1~$9$kJ8;zNs$G$J$1$l$P$J$j$^$;$s!#\e(B
+@var{username} \e$B$O%f!<%6!<L>$NJ8;zNs\e(B (\e$BNc$($P\e(B ``joe'') \e$B$G$9!#\e(B
+
@example
;; IMAP example
(setq auth (auth-source-user-or-password