X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=auth-ja.texi;h=7ae1c3b21ea4a41471f767803e1f8171edb7c28d;hb=cc43a88ed3fc852071c2de359bae8a49ceff13aa;hp=9b660c856462cfd56c76f61dc80fc2d155062459;hpb=3c3bc1b95aeeda3917363a0f6838305a5ffe324c;p=elisp%2Fgnus-doc-ja.git diff --git a/auth-ja.texi b/auth-ja.texi index 9b660c8..7ae1c3b 100644 --- a/auth-ja.texi +++ b/auth-ja.texi @@ -1,19 +1,16 @@ \input texinfo @c -*-texinfo-*- +@include gnus-overrides-ja.texi + @setfilename auth-ja @settitle Emacs auth-source Library @value{VERSION} -@set VERSION 0.1 -@dircategory Emacs -@direntry -* Auth-source-ja: (auth-ja). The Emacs auth-source library (Japanese). -@end direntry +@set VERSION 0.3 @copying $B$3$N%U%!%$%k$O(B Emacs auth-source $B%i%$%V%i%j!<$r@bL@$7$^$9!#(B -Copyright @copyright{} 2008, 2009 -Free Software Foundation, Inc. +Copyright @copyright{} 2008-2011 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document @@ -51,21 +48,27 @@ license to the document, as described in section 6 of the license. @end quotation @end copying -@tex +@dircategory Emacs lisp libraries +@direntry +* Auth-source-ja: (auth-ja). The Emacs auth-source library (Japanese). +@end direntry @titlepage +@ifset WEBHACKDEVEL +@title Emacs auth-source Library (DEVELOPMENT VERSION) +@end ifset +@ifclear WEBHACKDEVEL @title Emacs auth-source Library - +@end ifclear @author by Ted Zlatanov @page - @vskip 0pt plus 1filll @insertcopying @end titlepage -@page -@end tex +@contents +@ifnottex @node Top @top Emacs auth-source $B$3$N%^%K%e%"%k$O(B Emacs auth-source $B%i%$%V%i%j!<$r@bL@$7$^$9!#(B @@ -73,70 +76,147 @@ license to the document, as described in section 6 of the license. $BMxMQ$H%Q%9%o!<%I$O2?$@$C$1(B?$B!W$H(B +$B$$$&@N$J$,$i$NG.Nu$JLd$$$KEz$($k$?$a$N!"(BEmacs $B$H(B Gnus $BMQ$N?t$"$kC1=c$JC2P4o$O$I$3$@(B?$B!W$H$$$&8E$/$+$i$NLd$$$H$O0[$J$j$^$9!#(B) + +Auth-source $B%i%$%V%i%j!<$OC1$J$k%f!<%6!$d%Q%9%o!<%I(B ($B$$$o$f$kHkL)(B) $B0J(B +$B30$N$b$N$b07$&$3$H$,$G$-$^$9!#(B + +$BF1MM$K(B auth-source $B%i%$%V%i%j!<$OB?$/$NCyB"%P%C%/%(%s%I!"8=:_$OEAE}E*(B +$B$J(B ``netrc'' $B%P%/%(%s%I(B ($B$3$NJ8=q$N8e$NJ}$K$"$j$^$9(B) $B$^$?$O%7!<%/%l%C%H(B +$B%5!<%S%9(B API $B$r%5%]!<%H$7$^$9!#$3$l$O(B EIEIO $B$K4p$E$$$?%P%/%(%s%I$G9T$J$o(B +$B$l!"$b$7I,MW$J$i$"$J$?FH<+$N$b$N$r=q$/$3$H$,$G$-$^$9!#(B @node Help for users @chapter $BMxMQ$N$I(B -$B$s$JLdBj$K$D$$$F$b!"2?$,%A%'%C%/$5$l$F$$$k$+$rD4$Y$k$N$,!"$"$J$?$NBh0lJb(B -$B$G$9!#(B +``Netrc'' $B%U%!%$%k$O;ve$NI8=`$G$9!#$=$l$i$O$3$N$h$&$K$J$C$F$$$^$9(B: +@example +machine @var{mymachine} login @var{myloginname} password @var{mypassword} port @var{myport} +@end example + +@code{machine} $B$O%5!<%P!<$G$9(B (DNS $BL>$^$?$O(B IP $B%"%I%l%9$N$I$A$i$+(B)$B!#(B +@code{auth-source-search} $B8!:w$K$*$1$k(B @var{:host} $B$G$b$"$j$^$9!#(B +@code{host} $B$b;H$&$3$H$,$G$-$^$9!#(B + +@code{port} $B$O@\B3$9$k%]!<%H$^$?$O%W%m%H%3%k$G$9!#(B +@code{auth-source-search} $B8!:w$K$*$1$k(B @var{:port} $B$G$b$"$j$^$9!#(B + +@code{user} $B$O%f!<%6!$G$9!#(B@code{auth-source-search} $B8!:w$K$*$1(B +$B$k(B @var{:user} $B$G$b$"$j$^$9!#(B@code{login} $B$*$h$S(B @code{account} $B$b;H$&$3(B +$B$H$,$G$-$^$9!#(B + +$B6uGrJ8;z$O(B auth-source $B$K4X$7$F$O>o$K(B OK $B$G$9(B ($BB>$N%W%m%0%i%`$K$ONI$/$J(B +$B$$$+$b$7$l$^$;$s$,(B)$B!#%G!<%?$O0zMQId$G0O$s$G$/$@$5$$!#%G!<%?Cf$N0zMQId$O(B +$B$"$J$?$NM=A[DL$j(B @code{\} $B$G%(%9%1!<%W$7$F$/$@$5$$!#(B -$B@_Dj(B: +$B$9$Y$F$3$l$i$OG$0U$G$9!#$I$3$G$bF1$8%Q%9%o!<%I$r;H$&$?$a$K!"$?$@C1$K(B + +@example +password @var{mypassword} +@end example + +$B$H@_Dj$9$k$3$H$,$G$-$^$9(B---$B$H$$$&$3$H$,2DG=$G$"$k$3$H$r<($7$F$$$k$N$G$"$C(B +$B$F!"$=$l$r?d>)$7$F$$$k$o$1$G$O$"$j$^$;$s!#7+$jJV$7$^$9$,(B @emph{$B$3$l$O;H(B +$B$o$J$$$G$/$@$5$$(B}$B!#$5$b$J$$$H$R$I$$L\$K2q$&$G$7$g$&!#(B + +``Netrc'' $B%U%!%$%k$ODL>o(B @code{.authinfo} $B$^$?$O(B @code{.netrc} $B$H8F$P$l(B +$B$^$9!#:#$G$O(B @code{.authinfo} $B$NJ}$,Ia5Z$7$F$$$k$h$&$G$9$,!"8e$G$o$+$k$h(B +$B$&$K(B auth-source $B%i%$%V%i%j!<$O$=$l$i$NN>J}$r$N$I$s$JLdBj(B +$B$K$D$$$F$b!"2?$,%A%'%C%/$5$l$F$$$k$+$rD4$Y$k$N$,!"$"$J$?$NBh0lJb$G$9!#Bh(B +$BFs$N%9%F%C%W$O$b$A$m$s$=$l$K$D$$$F$N(B blog $B$r=q$$$F!"%3%a%s%H$G2sEz$rBT$D(B +$B$3$H$G$9!#(B + +$BJQ?t(B @code{auth-sources} $B$r%+%9%?%^%$%:$9$k$3$H$,$G$-$^$9!#$b$78E$$%P!<(B +$B%8%g%s$N(B Emacs $B$r;H$C$F$$$k$+!"2?$+$NM}M3$N$?$a$K(B auth-source $B%i%$%V%i%j!<(B +$B$,FI$_9~$^$l$J$$>l9g!"H(B)$B!#(B +(setq auth-sources '((:source "~/.authinfo.gpg"))) +;;; $B$5$i$KC;$$(B @emph{$B%G%#%U%)%k%H(B}: +(setq auth-sources '("~/.authinfo.gpg" "~/.authinfo" "~/.netrc")) +;;; $B%7!<%/%l%C%H(B API $B$N(B @var{Login} $B%3%l%/%7%g%s$r;H$&(B +;;; (@pxref{Secret Service API}) +(setq auth-sources '("secrets:Login")) +@end lisp + +$BFCDj$N%[%9%H$+%W%m%H%3%k$N%(%s%H%j!<$rJ#?t(B @code{auth-sources} $B$KDI2C$9(B +$B$k$3$H$K$h$C$F!"$=$N%[%9%H$+%W%m%H%3%k$KFC2=$7$?(B netrc $B%U%!%$%k$r;}$D$3(B +$B$H$,$G$-$^$9!#IaDL$3$l$OI,MW$"$j$^$;$s$,!"(Bnetrc $B%U%!%$%k$r6&M-$7$?$jJQ$o$C(B +$B$?@_Dj$,$"$k>l9g$O0UL#$,$"$k$+$b$7$l$^$;$s(B (90% $B$N(B Emacs $B%f!<%6!<$OJQ$J(B +$B@_Dj$r;}$C$F$$$F!";D$j$N(B 10% $B$O(B @emph{$BK\Ev$K(B} $BJQ$o$C$F$$$^$9(B)$B!#(B + +$B$3$l$O!":.:_$9$k(B 2$B$D$N%=!<%9$r;H$&Nc$G$9(B: + +@lisp +(setq auth-sources '((:source (:secrets default) :host "myserver" :user "joe") + "~/.authinfo.gpg")) @end lisp -$B8D!9$N%[%9%H$^$?$O%W%m%H%3%k$N$?$a$NJ#?t$N9`L\$r$=$N%j%9%H$K2C$($k$3$H$K(B -$B$h$C$F!"$=$N%[%9%H$d%W%m%H%3%k$N$?$a$NFCDj$N(B netrc $B%U%!%$%k$r;}$D$3$H$,(B -$B$G$-$^$9!#(B @end defvar -``Netrc'' $B%U%!%$%k$O;ve$NI8=`$G$9!#$=$l$i$O$3$N$h$&$K$J$C$F$$$^$9(B: +$B$b$7(B @code{auth-sources} $B$r%+%9%?%^%$%:$7$J$$$H!"%G%#%U%)%k%H$G@83h$9$k(B +$B$3$H$K$J$k$G$7$g$&!#$=$N%G%#%U%)%k%H$H$O!"$I$s$J%[%9%H$b%]!<%H$K$D$$$F(B +$B$b(B netrc $B%U%!%$%k(B @file{~/.authinfo.gpg} $B$r;2>H$9$k$H$$$&$3$H$G$9!#$3$l(B +$B$O(B GnuPG $B$G0E9f2=$5$l$?%U%!%$%k$G$9(B (@pxref{GnuPG and EasyPG Assistant +Configuration})$B!#(B + +$B$b$7$=$NFI$_9~$_$K<:GT$9$k$H!"0E9f2=$5$l$F$$$J$$(B netrc $B%U%!%$%k$G$"(B +$B$k(B @code{~/.authinfo}$B!"B3$$$F(B @code{~/.netrc} $B$,;H$o$l$^$9!#(B + +$BBeI=E*$J(B netrc $B9T$NNc$O!"%]!<%H$,L5$$$b$N$G$9!#(B + @example -machine mymachine login myloginname password mypassword port myport +machine YOURMACHINE login YOU password YOURPASSWORD @end example -$B%]!<%H$N;XDj$OL5$/$F$b9=$$$^$;$s!#L5$$>l9g!"(Bauth-source $B$O$I$s$J%]!<%H(B -$B$b(B OK $B$J$N$@$H2rA0$+%]!<%H(B -$BHV9f$N$I$A$i$G$bNI$$$N$G!"$b$7$=$&$7$?$$$N$J$i$P!"%]!<%H(B 143 $B$H%W%m%H%3(B -$B%k(B ``imap'' $B$N$?$a$N9`L\$rJL!9$K;}$D$3$H$,$G$-$^$9!#(B - -$B$b$7(B @var{auth-sources} $B$r%+%9%?%^%$%:$7$J$$$H!"%G%#%U%)%k%H$G@83h$9$k$3(B -$B$H$K$J$k$G$7$g$&!#$=$N%G%#%U%)%k%H$H$O!"$I$s$J%[%9%H$b%]!<%H$K$D$$$F(B -$B$b(B netrc $B%U%!%$%k(B @code{~/.authinfo.gpg} $B$r;2>H$9$k$H$$$&$3$H$G$9!#$3$l(B -$B$O0E9f2=$5$l$?%U%!%$%k$G$9!#(BEPA $B$r;H$($k$h$&$K$7$F$$$k>l9g$K8B$j$^$9$,!"(B -$B$=$l$,6/$/?d>)$5$l$^$9!#(B +$B$3$l$O$I$NG'>Z%]!<%H$K$bBP1~$7$^$9!#4JC1$G$7$g$&(B? $B$G$b(B SMTP $B%5!<%P!<(B +$B$,(B IMAP $B%5!<%P!<$H0[$J$k%Q%9%o!<%I$rI,MW$H$9$k$=$N%^%7%s$N%]!<%H(B 433 $B$K(B +$B$"$k$J$i$P!"$I$&$G$9$+!)(B -@lisp -(require 'epa-file) -(epa-file-enable) -(setq epa-file-cache-passphrase-for-symmetric-encryption t) ; $B$H$F$b=EMW(B -@end lisp +@example +machine YOURMACHINE login YOU password SMTPPASSWORD port 433 +machine YOURMACHINE login YOU password GENERALPASSWORD +@end example url-auth $BG'>Z(B (HTTP/HTTPS) $B$N$?$a$K$O!"$3$l$r(B netrc $B%U%!%$%k$KCV$$$F$*$/(B $BI,MW$,$"$j$^$9(B: @@ -145,8 +225,9 @@ url-auth $BG'>Z(B (HTTP/HTTPS) $B$N$?$a$K$O!"$3$l$r(B netrc $B%U%!%$%k$KCV$ machine yourmachine.com:80 port http login testuser password testpass @end example -$B$3$l$O$I$s$J3&LL$HG'>ZJ}<0(B (basic $B$^$?$O(B digest) $B$K$b9gCW$7$^$9!#$b$C$H(B -$B>\:Y$J@)8f$,I,MW$J>l9g$O!"(Burl-auth $B$N%=!<%9%3!<%I$HJQ?t$rD4$Y$F$/$@$5$$!#(B +$B$3$l$O(B HTTP $B$G@\B3$9$k$I$s$J3&LL$HG'>ZJ}<0(B (basic $B$^$?$O(B digest) $B$K$bBP(B +$B1~$7$^$9!#(BHTTPS $B$bF1MM$K@_Dj$7$^$9!#$b$C$H$-$a:Y$+$$@)8f$,I,MW$J$i!"(B +url-auth $B$N%=!<%9%3!<%I$HJQ?t$rD4$Y$F$/$@$5$$!#(B Tramp $B$NG'>Z$K$O$3$l$r;H$C$F$/$@$5$$(B: @@ -156,40 +237,160 @@ machine yourmachine.com port scp login testuser password testpass $B%]!<%H$O(B Tramp $B$N@\B3J}K!$r0UL#$9$k$3$H$KCm0U$7$F$/$@$5$$!#$b$7%]!<%H$N(B $B9`$r;H$o$J$1$l$P!":G=i$NJ}$G@bL@$7$?$h$&$K!"$9$Y$F$N(B Tramp $B$NJ}<0$K9gCW(B -$B$7$^$9!#(B +$B$7$^$9!#(BTramp $B$K$O(B 88 $Bl9g$O(B +$B$3$l$,I,MW$+$b$7$l$^$;$s(B ($B$=$l$i$K$D$$$F$N0JA0$N%3%a%s%H$r8+$F$/$@$5$$(B)$B!#(B + +@node Secret Service API +@chapter $B%7!<%/%l%C%H%5!<%S%9(B API + +TODO: $B$I$&F/$/$+$r0lHLE*$K!"(Bsecrets.el $B$O$I$&$d$k$+!"$$$/$D$+$NNc!#(B @node Help for developers @chapter $B3+H/Z%H!<%/%s$re$G$"$l$P!"(B -$B%G%P%C%0$N$?$a$N%a%C%;!<%8$rI=<($7$^$9!#(B +auth-source $B%i%$%V%i%j!<$K$O!"30It$G;H$&$?$a$N4X?t$O>/$7$7$+$"$j$^$;$s!#(B -$B$b$7(B @var{mode} $B$,J8;zNs$N%j%9%H$J$i$P!"4X?t$OJ8;zNs$N%j%9%H$^$?(B -$B$O(B @code{nil} $B$rJV$7$^$9!#$=$l$,$?$@$NJ8;zNs$J$i$P!"4X?t$O0l$D$NJ8;zNs(B -$B$+(B @code{nil} $B$rJV$7$^$9!#:#$N$H$3$m(B mode $B$H$7(B -$B$F(B ``login'' $B$H(B ``password'' $B$@$1$rG'<1$7$^$9$,!">-Mh$O$b$C$H2C$($i$l$k(B -$B$G$7$g$&!#(B +@defun auth-source-search SPEC -@var{host} $B$O%[%9%HL>$NJ8;zNs$G$9!#(B +TODO: $B$I$&$d$C$F(B docstring $B$r4^$a$k(B? + +@end defun -@var{port} $B$O%W%m%H%3%kL>(B ($BNc$($P(B ``imap'') $B$^$?$O%]!<%HHV9f$G$9!#%f!<%6!<(B -$B$N(B netrc $B%U%!%$%k$K$"$k%]!<%H$KBP1~$9$kJ8;zNs$G$J$1$l$P$J$j$^$;$s!#(B +$B$G$O(B Gnus $B$N(B @code{nnimap.el} $B$+$i(B @code{auth-source-search} $B$r;H$&Nc$r(B +$B8+$F$_$^$7$g$&!#(B @example -;; IMAP example -(setq auth (auth-source-user-or-password - '("login" "password") - "anyhostnamehere" - "imap")) -(nth 0 auth) ; $B%m%0%$%sL>(B -(nth 1 auth) ; $B%Q%9%o!<%I(B +(defun nnimap-credentials (address ports) + (let* ((auth-source-creation-prompts + '((user . "IMAP user at %h: ") + (secret . "IMAP password for %u@@%h: "))) + (found (nth 0 (auth-source-search :max 1 + :host address + :port ports + :require '(:user :secret) + :create t)))) + (if found + (list (plist-get found :user) + (let ((secret (plist-get found :secret))) + (if (functionp secret) + (funcall secret) + secret)) + (plist-get found :save-function)) + nil))) @end example + +@c $B0J2<$NLuJ8$N$H%Q%9%o!<%I(B ($B<0Cf$N(B @code{secret}) $B$,(B +$B4^$^$l$k$3$H$r5a$a$F$$$^$9!#$5$i$K!"$b$7$=$N9`L\$,$^$@L5$+$C$?$i:n$kI,MW(B +$B$b$"$j$^$9!#$=$N9`L\$r:n$k:]$K%f!<%6!<$H$d$jl9g$O!"<0Cf$K$"$k2A$5$l$kI,MW$,$"$k$3$H$KCm0U$7$F$/(B +$B$@$5$$!#$"$kDxEY$N0BA4BP:v$H$7$F!"$=$l$O4X?t$GJq$^$l$F$$$^$9!#(B + +$B$=$N8e%m%0%$%s$K@.8y$7$?$i(B @code{nnimal.el} $B$OZ>p(B +$BJs(B ($B$?$@$7$3$l$,?7$?:n$i$l$?$b$N$G$"$k$N$J$i(B) $B$r%;!<%V$7$^$9!#(B + +$B:G=i$K$=$l$,8F$P$l$?8e!"(B@code{:save-function} $B$,:FEYAv$k$3$H$O$"$j$^$;$s(B +($B$7$+$7$b$7(B @code{auth-source-debug} $B$r(B @code{'trivia} $B$K@_Dj$7$F$"$k$J(B +$B$i$P!"$=$N$3$H$rB?>/5-O?$7$^$9!#$3$l$9$J$o$A!"$=$l$O]5F+$7$$F1$8l9g!"(Bauth-source $B%i%$%V%i%j!<(B +$B$O(B @file{~/.authinfo.gpg} (GnuPG $B$G0E9f2=$5$l$?%U%!%$%k(B) $B$rFI$_9~$_$^$9!#(B +$B$=$N8e$G(B @file{~/.authinfo} $B$r8!::$7$^$9$,!"$=$N$h$&$J0E9f2=$5$l$F$$$J$$(B +$B%U%!%$%k$r;H$&$3$H$O?d>)$7$^$;$s!#(B + +Emacs 23 $B0J9_$G$O(B @code{*.gpg} $B%U%!%$%k$N0E9f$r<+F0E*$K2r$/$?$a$N%*%W%7%g(B +$B%s(B @code{auto-encryption-mode} $B$,$"$j$^$9!#%G%#%U%)%k%H$GM-8z$G$9!#$b$7(B +$B2?$i$+$NM}M3$G(B Emacs $B$N=i4|$NHG$r;H$C$F$$$k>l9g$O!"0J2<$,I,MW$G$9(B: + +@lisp +(require 'epa-file) +(epa-file-enable) +@end lisp + +$B$"$J$?$N(B GnuPG $B$N%Q%9%o!<%I$,%-%c%C%7%e$5$l$k$h$&$K$7$?$$$J$i!"(B +@code{gpg-agent} $B$^$?$O(B EasyPG $B%"%7%9%"%s%H$r@_Dj$7$F$/$@$5(B +$B$$(B (@pxref{Caching Passphrases, , Caching Passphrases, epa})$B!#(B + +$Be5-$N$C$F$/$@$5$$!#(B + +ELisp $BHG$N%Q%9%o!<%I!&%-%c%C%7%e$r;H$&>l9g(B +$B$O(B @code{epa-file-cache-passphrase-for-symmetric-encryption} $B$r@_Dj$7$F(B +$B$/$@$5$$!#(B + @node Index @chapter Index @printindex cp @@ -202,8 +403,6 @@ auth-source $B%i%$%V%i%j!<$K$O!"30It$G;H$&$?$a$N4X?t$O0l$D$7$+$"$j$^$;$s!#(B @chapter Variable Index @printindex vr -@summarycontents -@contents @bye @c Local Variables: