cvs: peardoc /ja/package/authentication/auth constants.xml intro-storage.xml intro.xml
| From: | Tadashi Jokagi | Date: | Mon, 01 Mar 2004 03:28:25 +0000 |
| Subject: | cvs: peardoc /ja/package/authentication/auth constants.xml intro-storage.xml intro.xml | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-2816@lists.php.net to get a copy of this message | ||
elf Sun Feb 29 22:28:25 2004 EDT
Added files:
/peardoc/ja/package/authentication/auth constants.xml
intro-storage.xml
Modified files:
/peardoc/ja/package/authentication/auth intro.xml
Log:
o update xml file.
o It replaceed for Mr. haruki's contribution thing.
http://cvs.php.net/diff.php/peardoc/ja/package/authentication/auth/intro.xml?r1=1.2&r2=1.3&ty=u Index: peardoc/ja/package/authentication/auth/intro.xml diff -u peardoc/ja/package/authentication/auth/intro.xml:1.2 peardoc/ja/package/authentication/auth/intro.xml:1.3 --- peardoc/ja/package/authentication/auth/intro.xml:1.2 Sun Feb 22 03:52:07 2004 +++ peardoc/ja/package/authentication/auth/intro.xml Sun Feb 29 22:28:25 2004 @@ -1,247 +1,230 @@ -<!-- $Revision: 1.2 $ --> -<!-- EN-Revision: 1.7 --> -<refentry id="package.authentication.auth.intro"> - <refnamediv> - <refname>å°å ¥</refname> - <refpurpose>使ç¨ä¾</refpurpose> - </refnamediv> - <refsect1 id="packages.authentication.auth.intro.example"> - <title>èªè¨¼ãã¥ã¼ããªã¢ã«</title> - <simpara> - ãã®"ç°¡æãã¥ã¼ããªã¢ã«"ã®ç®çã¯ã - ç°¡åã«ä½¿ããèªè¨¼æ©æ§ã«ããã»ãã¥ã¢ãªãµã¤ããæ§ç¯ããã·ã¹ãã ã - è¨å®ãããã¨ã§ãã - </simpara> - <para> - ã»ãã¥ã¢ã¨ãããµã¤ãã®æä¸ä½ã«ã以ä¸ã®çãã³ã¼ããç½®ãã¦ã¿ã¾ãããã - </para> - <example> - <title><classname>PEAR::Auth</classname>ã®å ¸åçãªä½¿ç¨ä¾</title> - <programlisting role="php"> - <![CDATA[ -require_once "Auth/Auth.php"; - -function loginFunction() -{ - /** - * Change the HTML output so that it fits to your - * application. - */ - echo "<form method=\"post\" action=\"" . $_SERVER['PHP_SELF'] . "\">"; - echo "<input type=\"text\" name=\"username\">"; - echo "<input type=\"password\" name=\"password\">"; - echo "<input type=\"submit\">"; - echo "</form>"; -} - -$dsn = "mysql://user:password@localhost/database"; -$a = new Auth("DB", $dsn, "loginFunction"); - -$a->start(); - -if ($a->getAuth()) { - /** - * The output of your site goes here. - */ -} - ]]> - </programlisting> - <para> - ãã®çãã³ã¼ãã¯ãèªè¨¼ã·ã¹ãã ã®ã¤ã³ã¹ã¿ã³ã¹ã使ãããã®ã§ãã - </para> - <para> - æåã®è¡ã§ã¯ãPEARãã£ã¬ã¯ããªãããã¡ã¤ã«ãèªã¿è¾¼ãã§ãã¾ãã - ããã¯ã - <classname>PEAR::Auth</classname> - ãå®è¡ããéã«å¿ è¦ãªã³ã¼ããå ¨ã¦å«ã¿ã¾ãã - ãã®å¾ããã°ã¤ã³ç»é¢ã表示ãã颿°ã1ã¤å®ç¾©ãã¾ãã - ãã®é¢æ°ã¯ã - ãã®ãã¼ã¸ãé²è¦§ããè ããã°ã¤ã³ãã¼ã¿ãå ¥åããããã«ä½¿ç¨ããã¾ãã - ãã®é¢æ°ã® - <acronym>HTML</acronym> - ãã©ã¼ãããã¯èªç±ã«å¤æ´ãããã¨ãåºæ¥ã¾ãã - </para> - <para> - <warning> - <simpara> - ãã®é¢æ°ã®HTMLãã©ã¼ãããã¯èªç±ã«å¤æ´ã§ãã¾ããã - inputããã¯ã¹ã®nameã¯å¤æ´ãã¦ã¯ããã¾ããã - ããã㯠- <literal>username</literal>ããã³<literal>password</literal> - ã¨ããå¿ è¦ãããã¾ãã - </simpara> - </warning> - </para> - <para> - ãã°ã¤ã³ãã¼ã¿ãæ¤è¨¼ããããã«ãã¼ã¿ãã¼ã¹ã使ç¨ããããã - ããã§ã夿°<varname>$dsn</varname>ã使ãã¾ãã - ãã®å¤æ°ã«ã¯ã - <link linkend="package.database.db">PEAR::DB</link> - ã«ãããã¼ã¿ãã¼ã¹ã¨æ¥ç¶ããéã«ä½¿ç¨ãããæå¹ãªDSNæååãæå®ãã¾ãã - ãã®ä»ã®ã¹ãã¬ã¼ã¸ã³ã³ããã使ç¨ãããå ´åã¯ã - å¾è¿°ãã詳細ãªèª¬æãåç §ä¸ããã - </para> - <para> - ãã®å¾ãç§ãã¡ã¯èªè¨¼ãªãã¸ã§ã¯ãã使ãã¾ãã - æåã®ãã©ã¡ã¼ã¿ã¼ã¯ãã¹ãã¬ã¼ã¸ã³ã³ããã®ååãå®ç¾©ãã¾ãã - ç§ãã¡ã¯ãã¼ã¿ãã¼ã¹ãæä½ããã¹ãã¬ã¼ã¸ã³ã³ããã使ç¨ãããã®ã§ã - ããã§ã¯"DB"ãæå®ãã¾ãã - 第2ã®ãã©ã¡ã¼ã¿ã¼ã¯ã³ã³ãããã©ã¤ãã®æ¥ç¶ãã©ã¡ã¼ã¿ã§ãã - ç§ãã¡ã¯ãããããå®ç¾©ããDSNæååã使ç¨ãã¾ãã - ç§ãã¡ã¯ä»¥åã«å®ç¾©ãããDSNã¹ããªã³ã°ã使ç¨ãã¾ãã - 3çªç®ã®ãã©ã¡ã¼ã¿ã¯ã - ã¹ã¯ãªããã®åãã«ç§ãã¡ãå®ç¾©ãã颿°ã®ååã§ãã - ããã¯ãã°ã¤ã³ãã©ã¼ã ãåºåãã¾ãã - </para> - <para> - ä»ãç§ãã¡ã®èªè¨¼ãªãã¸ã§ã¯ãã¯åæåã¨ãç§ãã¡ã¯ã - ã¦ã¼ã¶ããã°ã¤ã³ãã¦ãããã©ãããã§ãã¯ããå¿ è¦ãããã¾ãã - ããã¯<function>getAuth</function>ãéãã¦è¡ãã¾ãã - ããã&true;ãè¿ãå ´åã - ç§ãã¡ã¯ãã¼ã¸ã®å 容ãã¦ã¼ã¶ã¸æ¸¡ããã¨ãã§ãã¾ãã - </para> - <para> - <warning> - <para> - ä»ã®ã¨ãã<literal>register_globals=on</literal>㨠- <programlisting role="php"> - <![CDATA[ - $auth = new Auth(...); - ]]> - </programlisting> - ã¯<varname>$auth</varname> - ãã»ãã·ã§ã³å¤æ° - (<classname>PEAR::Auth</classname>ãå é¨ã§ä½¿ç¨ãã¾ã) - ã®ååãªã®ã§ã - <literal>register_globals=on</literal>ã§ã¯ä½¿ç¨åºæ¥ã¾ããã - </para> - <para> - For now one cannot use - <programlisting role="php"> - <![CDATA[ - $auth = new Auth(...); - ]]> - </programlisting> - with <literal>register_globals=on</literal>, because - <varname>$auth</varname> is also the name of the session variable, - that is internally used by <classname>PEAR::Auth</classname>. - </para> - </warning> - </para> - </example> - <example> - <title>ãªãã·ã§ã³ã®èªè¨¼ã®ä½¿ç¨</title> - <programlisting role="php"> - <![CDATA[ -require_once "Auth/Auth.php"; - -function loginFunction() -{ - /** - * Change the HTML output so that it fits to your - * application. - */ - echo "<form method=\"post\" action=\"" . $_SERVER['PHP_SELF'] . "?login=1\">"; - echo "<input type=\"text\" name=\"username\">"; - echo "<input type=\"password\" name=\"password\">"; - echo "<input type=\"submit\">"; - echo "</form>"; -} - -if (isset($_GET['login']) && $_GET['login'] == 1) { - $optional = true; -} else { - $optional = false; -} - -$dsn = "mysql://user:password@localhost/database"; -$a = new Auth("DB", $dsn, "loginFunction", $optional); - -$a->start(); - -echo "Everybody can see this text!<br />"; - -if (!isset($_GET['login'])) { - echo "<a href=\"test.php?login=1\">Click here to log in</a>\n"; -} - -if ($a->getAuth()) { - echo "One can only see this if he is logged in!"; -} - ]]> - </programlisting> - <para> - This is a pretty nice example for the optional login feature: The - last parameter <parameter>$optional</parameter> can be either &true; - or &false;. If it is &false;, the login form is not shown and the user - only sees the text "Everybody can see this text!". If he clicks on - the link above this text, he gets the same page but with the GET - parameter "login=1". Now he can enter his login information in the - login form. If he successfully logs in, he can then see the text - "Everybody can see this text!" and the text "One can only see this - if he is logged in!". - </para> - </example> - - <example> - <title>ãã°ã¢ã¦ãæ©è½æ§</title> - <simpara> - 次ã®ä¾ã¯ã«ã¬ã³ãã¦ã¼ã¶ã¼ã<quote>ãã°ã¢ã¦ã</quote>ãã - åã³ãã°ã¤ã³ãã©ã¼ã ã表示ãã¾ãã - </simpara> - <programlisting role="php"> -$myauth->start(); - -if ($_GET['action'] == "logout") { - $myauth->logout(); - $myauth->start(); -} - </programlisting> - </example> - - <para> - 次ã®ç¯ã§ã¯ã - ç§ãã¡ã¯<classname>PEAR::Auth</classname> - ã®æ©è½ã«é¢ããããå¤ãã®è©³ç´°æ å ±ãã«ãã¼ãã¾ãã - </para> - <para> - ãã®SQLæã¯MySQLã使ç¨ãã¦ã - ããã©ã«ãã®ãã¼ã¿ãã¼ã¹èªè¨¼ã¹ãã¼ã ã§ä½¿ç¨å¯è½ãªãã¼ãã«ã使ãã¾ãã - </para> - <programlisting role="sql"> - <![CDATA[ -CREATE TABLE auth ( - username VARCHAR(50) default '' NOT NULL, - password VARCHAR(32) default '' NOT NULL, - PRIMARY KEY (username), - KEY (password) -); - ]]> - </programlisting> - <para> - ãããã¯èªè¨¼ãå¦çãããã¨ã«å¿ è¦ãªãã¼ãã«ããã³ãã£ã¼ã«ãåã§ãã - The password column must be at least 32 characters - long because we store passwords encrypted using md5() and that is - the length of the values returned by md5(). - </para> - </refsect1> -</refentry> -<!-- Keep this comment at the end of the file -Local variables: -mode: sgml -sgml-omittag:t -sgml-shorttag:t -sgml-minimize-attributes:nil -sgml-always-quote-attributes:t -sgml-indent-step:1 -sgml-indent-data:t -sgml-parent-document:nil -sgml-default-dtd-file:"../../../../manual.ced" -sgml-exposed-tags:nil -sgml-local-catalogs:nil -sgml-local-ecat-files:nil -End: -vim600: syn=xml fen fdm=syntax fdl=2 si -vim: et tw=78 syn=sgml -vi: ts=1 sw=1 ---> +<!-- $Revision: 1.3 $ --> +<!-- EN-Revision: 1.7 Maintainer: haruki Status: ready --> +<refentry id="package.authentication.auth.intro"> + <refnamediv> + <refname>å°å ¥</refname> + <refpurpose>使ç¨ä¾</refpurpose> + </refnamediv> + <refsect1 id="packages.authentication.auth.intro.example"> + <title>Authã«ã¤ãã¦ã®ãã¥ã¼ããªã¢ã«</title> + <simpara> + ãã®"ãããã¥ã¼ããªã¢ã«"ã§ã¯ã + ç°¡åãªèªè¨¼æ©æ§ãå©ç¨ãã¦ã + ãµã¤ããã»ãã¥ã¢ã«ããã·ã¹ãã ãæ§ç¯ãããã¨ãç®æ¨ã¨ãã¾ãã + </simpara> + <para> + ã»ãã¥ã¢ã«ããããµã¤ãã®ã¯ããã«ã以ä¸ã®çãã³ã¼ããç½®ãã¦ã¿ã¾ãããã + </para> + <example> + <title><classname>PEAR::Auth</classname>ã®å ¸åçãªä½¿ç¨ä¾</title> + <programlisting role="php"> + <![CDATA[ +require_once "Auth/Auth.php"; + +function loginFunction() +{ + /** + * HTMLåºåã¯ã使ããã¢ããªã±ã¼ã·ã§ã³ã«åãããã«ã + * 夿´ãã¦ãã ããã + */ + echo "<form method=\"post\" action=\"" . $_SERVER['PHP_SELF'] . "\">"; + echo "<input type=\"text\" name=\"username\">"; + echo "<input type=\"password\" name=\"password\">"; + echo "<input type=\"submit\">"; + echo "</form>"; +} + +$dsn = "mysql://user:password@localhost/database"; +$a = new Auth("DB", $dsn, "loginFunction"); + +$a->start(); + +if ($a->getAuth()) { + /** + * ãµã¤ãã®åºåã¯ããã + */ +} + ]]> + </programlisting> + <para> + ãã®ãããªçãã³ã¼ãã§ããèªè¨¼ã·ã¹ãã ã®ä¾ã示ããã¨ãåºæ¥ã¾ãã + </para> + <para> + æåã®è¡ã§ã¯ãPEARãã£ã¬ã¯ããªãããã¡ã¤ã«ãèªã¿è¾¼ãã§ãã¾ãã + ãã®ãã¡ã¤ã«ã«ã¯ã<classname>PEAR::Auth</classname> + ã®å®è¡ã«å¿ è¦ãªã³ã¼ããå ¨ã¦å«ã¾ãã¦ãã¾ãã + 次ã«ããã¼ã¸ã®é²è¦§è ããã°ã¤ã³ãã¼ã¿ãå ¥åããããã«ä½¿ç¨ãã + ãã°ã¤ã³ãã©ã¼ã ã表示ãã颿°ãå®ç¾©ãã¾ãã + ãã®é¢æ°ã®<acronym>HTML</acronym> + ãã©ã¼ãããã¯èªç±ã«å¤æ´ãããã¨ãåºæ¥ã¾ãã + </para> + <para> + <warning> + <simpara> + æ¬é¢æ°ã®HTMLãã©ã¼ãããã¯èªç±ã«å¤æ´ã§ãã¾ããã + inputããã¯ã¹ã®nameã¯å¤æ´ãã¦ã¯ããã¾ããã + ãããã¯ã + <literal>username</literal>ããã³<literal>password</literal> + ã¨ããå¿ è¦ãããã¾ãã + </simpara> + </warning> + </para> + <para> + ãã®ä¾ã§ã¯ããã°ã¤ã³ãã¼ã¿ã®æ¤è¨¼ã«ãã¼ã¿ãã¼ã¹ã使ç¨ããã®ã§ã + 夿°<varname>$dsn</varname>ã使ãã¾ãã + ãã®å¤æ°ã«ã¯ã + <link linkend="package.database.db">PEAR::DB</link> + ã«ãããã¼ã¿ãã¼ã¹æ¥ç¶ã«ä½¿ãããæå¹ãªDSNæååãæå®ãã¾ãã + ããã©ã«ãã®ãã¼ãã«ã¹ãã¼ãã«ã¤ãã¦ãããã³ + ãã¼ã¿ãã¼ã¹ä»¥å¤ã®ã¹ãã¬ã¼ã¸ã³ã³ããã使ç¨ããæ¹æ³ã«ã¤ãã¦ã¯ã + å¾è¿°ã®èª¬æãåç §ä¸ããã + </para> + <para> + ãã®å¾ãèªè¨¼ãªãã¸ã§ã¯ãã使ãã¾ãã + ã¯ããã®ãã©ã¡ã¼ã¿ã«ã¯ãã¹ãã¬ã¼ã¸ã³ã³ããåãæå®ãã¾ãã + ããã§ã¯ããã¼ã¿ãã¼ã¹ã«ããã¹ãã¬ã¼ã¸ã³ã³ããã使ç¨ããã®ã§ã + "DB"ãæ¸¡ãã¾ãã + ï¼çªç®ã¯ã使ç¨ããã¹ãã¬ã¼ã¸ã³ã³ããã®ãã©ã¤ãã¸ã® + ã³ãã¯ã·ã§ã³å¼æ°ã§ãã + ããã§ã¯ãå®ç¾©æ¸ã®DSNæååã使ãã¾ãã + ï¼çªç®ã®ãã©ã¡ã¼ã¿ã¯ããã°ã¤ã³ãã©ã¼ã ã表示ãã颿°åã§ãã + </para> + <para> + ã¤ãã§ãèªè¨¼ãªãã¸ã§ã¯ããåæåãã¾ããããã¦ã + ã¦ã¼ã¶ããã°ã¤ã³ãã¦ãããã©ãã調ã¹ãå¿ è¦ãããã¾ãã + ããã¯ã<function>getAuth</function>ã¡ã½ããã«ããè¡ãã¾ãã + &true;ãè¿ãããã¨ããã¼ã¸ã®å 容ãã¦ã¼ã¶ã«ç¤ºããã¨ãã§ãã¾ãã + </para> + <para> + <warning> + <para> + ç¾å¨ã®ã¨ããã<literal>register_globals=on</literal>ã®å ´åã以ä¸ã®ã³ã¼ãã¯ä½¿ç¨ã§ãã¾ããã + <programlisting role="php"> + <![CDATA[ + $auth = new Auth(...); + ]]> + </programlisting> + ãã®çç±ã¯ã<varname>$auth</varname>ãã<classname>PEAR::Auth</classname>å é¨ã§ä½¿ç¨ããã¦ãã + ã»ãã·ã§ã³å¤æ°åã§ããããã§ãã + </para> + </warning> + </para> + </example> + <example> + <title>èªè¨¼ã®é¸æçãªä½¿ç¨</title> + <programlisting role="php"> + <![CDATA[ +require_once "Auth/Auth.php"; + +function loginFunction() +{ + /** + * HTMLåºåã¯ã使ããã¢ããªã±ã¼ã·ã§ã³ã«åãããã«ã + * 夿´ãã¦ãã ããã + */ + echo "<form method=\"post\" action=\"" . $_SERVER['PHP_SELF'] . "?login=1\">"; + echo "<input type=\"text\" name=\"username\">"; + echo "<input type=\"password\" name=\"password\">"; + echo "<input type=\"submit\">"; + echo "</form>"; +} + +if (isset($_GET['login']) && $_GET['login'] == 1) { + $optional = true; +} else { + $optional = false; +} + +$dsn = "mysql://user:password@localhost/database"; +$a = new Auth("DB", $dsn, "loginFunction", $optional); + +$a->start(); + +echo "ãã¹ã¦ã®äººããã®ããã¹ããèªãã¾ãã<br />"; + +if (!isset($_GET['login'])) { + echo "<a href=\"test.php?login=1\">ãã°ã¤ã³</a>\n"; +} + +if ($a->getAuth()) { + echo "ãã°ã¤ã³ãã人ã ããããããè¦ãã¾ãã"; +} + ]]> + </programlisting> + <para> + ä¸è¨ã¯ããã°ã¤ã³æ©è½ã鏿çã«ä½¿ç¨ããä¾ã§ãã + æå¾ã®<parameter>$optional</parameter>ãã©ã¡ã¼ã¿ã¯ã + &true;ã¾ãã¯&false;ã¨ãã¾ãã + &false;ã¨ããå ´åããã°ã¤ã³ãã©ã¼ã ã¯è¡¨ç¤ºãããã + ã¦ã¼ã¶ã¯ããã¹ã¦ã®äººããã®ããã¹ããèªãã¾ããã + ã®æã ããè¦ããã¨ãã§ãã¾ãã + ãããã¦ã¼ã¶ãããã®ãã¼ã¸ä¸é¨ã®ãªã³ã¯ãã¯ãªãã¯ããã¨ã + GETãã©ã¡ã¼ã¿ã"login=1"ã¨ãã¦ãåããã¼ã¸ã«æ¥ç¶ãã¾ãã + ä»åã¯ããã°ã¤ã³æ å ±ããã°ã¤ã³ãã©ã¼ã ã«å ¥åã§ãã¾ãã + ãã°ã¤ã³ã«æåããã¨ã + ããã¹ã¦ã®äººããã®ããã¹ããèªãã¾ãããã®æã¨ + ããã°ã¤ã³ãã人ã ããããããè¦ãã¾ããã + ã®æã®ä¸¡æ¹ãè¦ããã¨ãã§ãã¾ãã + </para> + </example> + + <example> + <title>ãã°ã¢ã¦ãæ©è½</title> + <simpara> + 以ä¸ã®ä¾ã§ã¯ãç¾å¨ã®ã¦ã¼ã¶ã<quote>logout</quote>ããã + ãã°ã¤ã³ãã©ã¼ã ãåã³è¡¨ç¤ºãã¾ãã + </simpara> + <programlisting role="php"> +$myauth->start(); + +if ($_GET['action'] == "logout") { + $myauth->logout(); + $myauth->start(); +} + </programlisting> + </example> + + <para> + 以ä¸ã§ã¯ã<classname>PEAR::Auth</classname>ã®æ©è½ã«ã¤ãã¦ã® + 詳細ã示ãã¾ãã + </para> + <para> + 次ã®SQLæã¯ãMySQLã使ç¨ãã¦ã + ãã¼ã¿ãã¼ã¹èªè¨¼ç¨ã®ããã©ã«ãã®ã¹ãã¼ã ã使ãã¾ãã + </para> + <programlisting role="sql"> + <![CDATA[ +CREATE TABLE auth ( + username VARCHAR(50) default '' NOT NULL, + password VARCHAR(32) default '' NOT NULL, + PRIMARY KEY (username), + KEY (password) +); + ]]> + </programlisting> + <para> + èªè¨¼ãæ©è½ãããããã«å¿ è¦ãªãã¼ãã«åã¨ãã£ã¼ã«ãåã示ããã¦ãã¾ãã + passwordã«ã©ã ã¯ãmd5()ã«ããæå·åããããã¹ã¯ã¼ããä¿æããããã«ã + å°ãªãã¨ãmd5()ã®å¸°ãå¤ã®é·ãã§ãã32æå以ä¸ã¨ããå¿ è¦ãããã¾ãã + </para> + </refsect1> +</refentry> +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> http://cvs.php.net/co.php/peardoc/ja/package/authentication/auth/constants.xml?r=1.1&p=1 Index: peardoc/ja/package/authentication/auth/constants.xml +++ peardoc/ja/package/authentication/auth/constants.xml <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.2 Maintainer: haruki Status: ready --> <refentry id="package.authentication.auth.constants"> <refnamediv> <refname>&title.constants;</refname> <refpurpose>&purpose.preconstants;</refpurpose> </refnamediv> <refsect1 id="package.authentication.auth.constants.auth-idled"> <title><constant>AUTH_IDLED</constant></title> <para> -1 </para> </refsect1> <refsect1 id="package.authentication.auth.constants.auth-expired"> <title><constant>AUTH_EXPIRED</constant></title> <para> -2 </para> </refsect1> <refsect1 id="package.authentication.auth.constants.auth-wrong-login"> <title><constant>AUTH_WRONG_LOGIN</constant></title> <para> -3 </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/ja/package/authentication/auth/intro-storage.xml?r=1.1&p=1 Index: peardoc/ja/package/authentication/auth/intro-storage.xml +++ peardoc/ja/package/authentication/auth/intro-storage.xml <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.11 Maintainer: haruki Status: ready --> <refentry id="package.authentication.auth.intro-storage"> <refnamediv> <refname>ã¹ãã¬ã¼ã¸ãã©ã¤ã</refname> <refpurpose>å°å ¥</refpurpose> </refnamediv> <refsect1 id="package.authentication.auth.intro.storage.overview"> <title>æ¦è¦</title> <para> <classname>PEAR::Auth</classname>ã§ã¯ã 種ã ã®ããããã¹ãã¬ã¼ã¸ã³ã³ããã使ç¨ã§ãã¾ãã 以ä¸ã§ã¯ãåã¹ãã¬ã¼ã¸ã³ã³ããã®è©³ç´°ã«ã¤ãã¦è¿°ã¹ã¾ãã ãããã³ã³ããã®ãããããããªãã®ãã¼ãºã«åè´ããªãå ´åã¯ã ç¬èªã®ãã®ã使ãããã¨ã容æã«å¯è½ã§ãã </para> </refsect1> <refsect1 id="package.authentication.auth.intro-storage.db"> <title>ãã¼ã¿ãã¼ã¹</title> <para> <classname>PEAR:Auth</classname>ã¯ã <link linkend="package.database.db"><classname>PEAR::DB</classname></link> æ½è±¡åã¬ã¤ã¤ã¼ã使ç¨ãã¾ãã ã¤ã¾ãããã°ã¤ã³ãã¼ã¿ãä¿æããããã«ã«ã DBæ½è±¡åã¬ã¤ã¤ã¼ããµãã¼ããããã¼ã¿ãã¼ã¹ããã©ãã§ã使ç¨ã§ãã¾ãã </para> <para> æ¬ã¹ãã¬ã¼ã¸ã使ç¨ããå ´åã <link linkend="package.authentication.auth.auth.auth"> <function>Auth constructor</function> </link>ã®å¼æ°ã¯é åã¨ãªãã¾ãã <table> <title>é åã®ãã¼ã¨å¤</title> <tgroup cols="3"> <thead> <row> <entry>ãã¼</entry> <entry>説æ</entry> <entry>ããã©ã«ãå¤</entry> </row> </thead> <tbody> <row> <entry><quote>dsn</quote></entry> <entry> æå¹ã§æ´å½¢å¼ã® <link linkend="package.database.db.intro-dsn"> DSN </link> </entry> <entry> <quote></quote> </entry> </row> <row> <entry><quote>table</quote></entry> <entry> èªè¨¼ãã¼ã¿ãä¿æããããã¼ã¿ãã¼ã¹ã®ãã¼ãã«å </entry> <entry> <quote>auth</quote> </entry> </row> <row> <entry><quote>usernamecol</quote></entry> <entry> ã¦ã¼ã¶åãä¿æãããã«ã©ã å </entry> <entry> <quote>username</quote> </entry> </row> <row> <entry><quote>passwordcol</quote></entry> <entry> MD5æå·åããããã¹ã¯ã¼ããä¿æãããã«ã©ã åã 32æå以ä¸ãä¿æå¯è½ã確èªãã¦ãã ããã </entry> <entry> <quote>password</quote> </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.authentication.auth.intro-storage.file"> <title>ãã¡ã¤ã«</title> <para> æ¬ã¹ãã¬ã¼ã¸ã使ç¨ããå ´åã <link linkend="package.authentication.auth.auth.auth"> <function>Auth constructor</function></link> ã®å¼æ°ã«ã¯ã <link linkend="package.filesystem.file-passwd.intro">passwdå½¢å¼</link>ã® ãã¡ã¤ã«åã§ãã </para> </refsect1> <refsect1 id="package.authentication.auth.intro-storage.smbpasswd"> <title>SMBPasswd</title> <para> ãã®ã¹ãã¬ã¼ã¸ã³ã³ããã¯ãSAMBAã®smbpasswdãã¡ã¤ã«ã使ã£ã¦èªè¨¼ã è¡ãã¾ãã æ¬ã¹ãã¬ã¼ã¸ã使ç¨ããå ´åã <link linkend="package.authentication.auth.auth.auth"> <function>Auth constructor</function></link> ã®å¼æ°ã¯ã <link linkend="package.filesystem.file-smbpasswd.intro">SAMBA passwdå½¢å¼</link>ã® ãã¡ã¤ã«åã§ãã </para> </refsect1> <refsect1 id="package.authentication.auth.intro-storage.imap"> <title>IMAP</title> <para> ãã®ã¹ãã¬ã¼ã¸ã³ã³ããã¯ãæå®ãããIMAPãµã¼ãã«æ¥ç¶ãã æå®ãããã¦ã¼ã¶åã»ãã¹ã¯ã¼ãã§ãã°ã¤ã³ãããã¨è©¦ã¿ã¾ãã </para> <para> æ¬ã¹ãã¬ã¼ã¸ã使ç¨ããå ´åã <link linkend="package.authentication.auth.auth.auth"> <function>Auth constructor</function></link> ã®å¼æ°ã¯ãé åã¨ãªãã¾ãã <table> <title>é åã®ãã¼ã¨å¤</title> <tgroup cols="3"> <thead> <row> <entry>ãã¼</entry> <entry>説æ</entry> <entry>ããã©ã«ãå¤</entry> </row> </thead> <tbody> <row> <entry><quote>host</quote></entry> <entry> IMAPãµã¼ãã®IPã¢ãã¬ã¹ã¾ãã¯ãã¹ãå </entry> <entry> <quote>localhost</quote> </entry> </row> <row> <entry><quote>port</quote></entry> <entry> IMAPãµã¼ããlisteningãã¦ãããã¼ã </entry> <entry> <quote>143</quote> </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.authentication.auth.intro-storage.ldap"> <title>LDAP</title> <para> æ¬ã¹ãã¬ã¼ã¸ã使ç¨ããå ´åã <link linkend="package.authentication.auth.auth.auth"> <function>Auth constructor</function></link> ã®å¼æ°ã¯ãé åã¨ãªãã¾ãã <table> <title>é åã®ãã¼ã¨å¤</title> <tgroup cols="3"> <thead> <row> <entry>ãã¼</entry> <entry>説æ</entry> <entry>ããã©ã«ãå¤</entry> </row> </thead> <tbody> <row> <entry><quote>host</quote></entry> <entry> ã¢ã¯ã»ã¹ãã¹ãIPã¢ãã¬ã¹ã¾ãã¯ãã¹ãå </entry> <entry> <quote>localhost</quote> </entry> </row> <row> <entry><quote>port</quote></entry> <entry> LDAPãµã¼ãã«æ¥ç¶ããããã®ãã¼ã </entry> <entry> <quote>389</quote> </entry> </row> <row> <entry><quote>basedn</quote></entry> <entry> ãã¼ã¹ã®åºå¥å </entry> <entry> <quote>o=netsols,c=de</quote> </entry> </row> <row> <entry><quote>userattr</quote></entry> <entry> ãªã¯ã¨ã¹ããã屿§å </entry> <entry> <quote>uid</quote> </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <!-- not release yet <refsect1 id="package.authentication.auth.intro-storage.mdb"> <title>MDB</title> <para> In addition to using <link linkend="package.database.db"> <classname>PEAR:DB</classname></link>, <classname>PEAR:Auth</classname> also can use the ><classname>MDB</classname> abstraction layer for database access. </para> <para> The storage-specific argument for the <link linkend="package.authentication.auth.auth.auth"> <function>Auth constructor</function> </link> is an array. <table> <title>Array keys and values</title> <tgroup cols="3"> <thead> <row> <entry>Key</entry> <entry>Description</entry> <entry>Default value</entry> </row> </thead> <tbody> <row> <entry><quote>dsn</quote></entry> <entry> A valid and well-formed <link linkend="package.database.db.intro-dsn"> DSN </link>. </entry> <entry> <quote></quote> </entry> </row> <row> <entry><quote>table</quote></entry> <entry> The name of the database table, where the authorization data is stored. </entry> <entry> <quote>auth</quote> </entry> </row> <row> <entry><quote>usernamecol</quote></entry> <entry> The name of the colunm, where the username is stored </entry> <entry> <quote>username</quote> </entry> </row> <row> <entry><quote>passwordcol</quote></entry> <entry> The name of the colunm, where the MD5-crypted password is stored. Make sure, that the password field can contain at least 32 bit. </entry> <entry> <quote>password</quote> </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> --> <refsect1 id="package.authentication.auth.intro-storage.pop3"> <title>POP3</title> <para> ãã®ã¹ãã¬ã¼ã¸ã³ã³ããã¯ãæå®ãããPOP3ãµã¼ãã«æ¥ç¶ãã æå®ãããã¦ã¼ã¶åã»ãã¹ã¯ã¼ãã§ãã°ã¤ã³ã試ã¿ã¾ãã </para> <para> æ¬ã¹ãã¬ã¼ã¸ã使ç¨ããå ´åã <link linkend="package.authentication.auth.auth.auth"> <function>Auth constructor</function></link> ã®å¼æ°ã¯ã<literal>server:port</literal>å½¢å¼ãã¾ãã¯åã« <literal>server</literal>å½¢å¼ã¨ãã¾ãã </para> </refsect1> <refsect1 id="package.authentication.auth.intro-storage.radius"> <title>RADIUS</title> <para> ãã®ã¹ãã¬ã¼ã¸ã³ã³ãããåä½ãããããã«ã¯ãPECL radiusãå¿ è¦ã§ãã </para> <para> æ¬ã¹ãã¬ã¼ã¸ã使ç¨ããå ´åã The storage-specific argument for the <link linkend="package.authentication.auth.auth.auth"> <function>Auth constructor</function></link> ã®å¼æ°ã¯ãé åã¨ãªãã¾ãã <table> <title>é åã®ãã¼ã¨å¤</title> <tgroup cols="3"> <thead> <row> <entry>ãã¼</entry> <entry>説æ</entry> <entry>ããã©ã«ãå¤</entry> </row> </thead> <tbody> <row> <entry><quote>servers</quote></entry> <entry> <para> RADIUSãµã¼ãã®é åã åãµã¼ãã¯ããã¹ãããã¼ããå ±æç§å¯éµï¼shared secretï¼ã ã¿ã¤ã ã¢ã¦ããæå¤§è©¦è¡æ°ããæãã </para> <para> ãã¹ã弿°ã«ã¯ãå®å ¨ä¿®é£¾ãã¡ã¤ã³å ã¾ãã¯ãããåºåãã®IPã¢ãã¬ã¹ãããã¹ãå½¢å¼ã§æå®ãã¾ãã ãã¼ã弿°ã«ã¯ããµã¼ãã«æ¥ç¶ããããã®UDPãã¼ããæå®ãã¾ãã ãã¼ã弿°ã«0ãä¸ããããå ´åã¯ã ãããã¯ã¼ã¯ãµã¼ãã¹ã®ãã¼ã¿ãã¼ã¹ä¸ã®radius/udpã®ã¨ã³ããªã 調ã¹ã¾ãã ã¨ã³ããªãè¦ã¤ããç¡ããã°ãRADIUSæ¨æºã®èªè¨¼ç¨ãã¼ã (1812)ã使ç¨ãã¾ãã å ±æç§å¯éµå¼æ°ã«ã¯ããµã¼ããã¹ãã«å¯¾ããå ±æç§å¯éµãæå®ãã¾ãã RADIUSãããã³ã«ã¯ãå ±æç§å¯éµã®128ãã¤ãç®ä»¥éãç¡è¦ãã¾ãã ã¿ã¤ã ã¢ã¦ã弿°ã«ã¯ããµã¼ãããã®å¿çã«å¯¾ããã¿ã¤ã ã¢ã¦ãã ç§åä½ã§æå®ãã¾ãã æå¤§è©¦è¡æ°ã«ã¯ãèªè¨¼ãæå¿µããã¾ã§ã« æå¤§ä½åèªè¨¼ãªã¯ã¨ã¹ããç¹°ãè¿ãããæå®ãã¾ãã </para> <para> æå¤§10ã®ãµã¼ããæå®ã§ãã¾ãã è¤æ°ã®ãµã¼ããæå®ãããå ´åã¯ã æå¹ãªã¬ã¹ãã³ã¹ãå¾ããããã åãµã¼ãã§æå¤§è©¦è¡æ°ã«éãããããã¾ã§ ã©ã¦ã³ãããã³å½¢å¼ã§è©¦è¡ãã¦ããã¾ãã </para> </entry> <entry> array(<quote>localhost</quote>, 0, <quote>testing123</quote>, 3, 3) </entry> </row> <row> <entry><quote>authtype</quote></entry> <entry> <para> ãªã¯ã¨ã¹ãã®èªè¨¼æ¹æ³ã PAP, CHAP_MD5, MSCHAPv1, MSCHAPv2ãæå®å¯è½ã </para> <para> åã¡ã½ãããã¨ã«ç°ãªãä¾åæ§ãåå¨ãã¾ãã PAP以å¤ã®ã¡ã½ããã¯ãCrypt_CHAPããã±ã¼ã¸ãå¿ è¦ã¨ãã¾ãã MS-CHAPã使ç¨ããå ´åã¯ãmhashæ¡å¼µãå¿ è¦ã§ãã </para> </entry> <entry> <quote>PAP</quote> </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.authentication.auth.intro-storage.soap"> <title>SOAP</title> <para> æ¬ã¹ãã¬ã¼ã¸ã使ç¨ããå ´åã The storage-specific argument for the <link linkend="package.authentication.auth.auth.auth"> <function>Auth constructor</function></link> ã®å¼æ°ã¯ãé åã¨ãªãã¾ãã <table> <title>é åã®ãã¼ã¨å¤</title> <tgroup cols="3"> <thead> <row> <entry>ãã¼</entry> <entry>説æ</entry> <entry>ããã©ã«ãå¤</entry> </row> </thead> <tbody> <row> <entry><quote>endpoint</quote></entry> <entry> 対象ãµã¼ãã¹ã®URI </entry> <entry /> </row> <row> <entry><quote>namespace</quote></entry> <entry> 対象WEBãµã¼ãã¹ã®ãã¼ã ã¹ãã¼ã¹ </entry> <entry /> </row> <row> <entry><quote>method</quote></entry> <entry> ã³ã¼ã«ãããSOAPã¡ã½ãã </entry> <entry /> </row> <row> <entry><quote>encoding</quote></entry> <entry> ã³ã³ãã³ãã®ã¨ã³ã³ã¼ãã£ã³ã° (ä¾ã<literal>utf8</literal>). </entry> <entry /> </row> <row> <entry><quote>usernamefield</quote></entry> <entry> ã¦ã¼ã¶åãä¿æããã¦ãããã£ã¼ã«ãå </entry> <entry /> </row> <row> <entry><quote>passwordfield</quote></entry> <entry> ãã¹ã¯ã¼ããä¿æããã¦ãããã£ã¼ã«ãå </entry> <entry /> </row> <!-- XXX: Document _features element --> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.authentication.auth.intro-storage.vpopmail"> <title>vpopmail</title> <para> ãã®ã³ã³ããã¯ãã¦ã¼ã¶åã¨ãã¹ã¯ã¼ãã®èªè¨¼ã« æ¢åã®vpopmailãµã¼ãã¹ã使ç¨ãã¾ãã </para> <para> æ¬ã¹ãã¬ã¼ã¸ã¯ã弿°ãè¦æ±ãã¾ããã </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->
http://cvs.php.net/diff.php/peardoc/ja/package/authentication/auth/intro.xml?r1=1.2&r2=1.3&ty=u Index: peardoc/ja/package/authentication/auth/intro.xml diff -u peardoc/ja/package/authentication/auth/intro.xml:1.2 peardoc/ja/package/authentication/auth/intro.xml:1.3 --- peardoc/ja/package/authentication/auth/intro.xml:1.2 Sun Feb 22 03:52:07 2004 +++ peardoc/ja/package/authentication/auth/intro.xml Sun Feb 29 22:28:25 2004 @@ -1,247 +1,230 @@ -<!-- $Revision: 1.2 $ --> -<!-- EN-Revision: 1.7 --> -<refentry id="package.authentication.auth.intro"> - <refnamediv> - <refname>å°å ¥</refname> - <refpurpose>使ç¨ä¾</refpurpose> - </refnamediv> - <refsect1 id="packages.authentication.auth.intro.example"> - <title>èªè¨¼ãã¥ã¼ããªã¢ã«</title> - <simpara> - ãã®"ç°¡æãã¥ã¼ããªã¢ã«"ã®ç®çã¯ã - ç°¡åã«ä½¿ããèªè¨¼æ©æ§ã«ããã»ãã¥ã¢ãªãµã¤ããæ§ç¯ããã·ã¹ãã ã - è¨å®ãããã¨ã§ãã - </simpara> - <para> - ã»ãã¥ã¢ã¨ãããµã¤ãã®æä¸ä½ã«ã以ä¸ã®çãã³ã¼ããç½®ãã¦ã¿ã¾ãããã - </para> - <example> - <title><classname>PEAR::Auth</classname>ã®å ¸åçãªä½¿ç¨ä¾</title> - <programlisting role="php"> - <![CDATA[ -require_once "Auth/Auth.php"; - -function loginFunction() -{ - /** - * Change the HTML output so that it fits to your - * application. - */ - echo "<form method=\"post\" action=\"" . $_SERVER['PHP_SELF'] . "\">"; - echo "<input type=\"text\" name=\"username\">"; - echo "<input type=\"password\" name=\"password\">"; - echo "<input type=\"submit\">"; - echo "</form>"; -} - -$dsn = "mysql://user:password@localhost/database"; -$a = new Auth("DB", $dsn, "loginFunction"); - -$a->start(); - -if ($a->getAuth()) { - /** - * The output of your site goes here. - */ -} - ]]> - </programlisting> - <para> - ãã®çãã³ã¼ãã¯ãèªè¨¼ã·ã¹ãã ã®ã¤ã³ã¹ã¿ã³ã¹ã使ãããã®ã§ãã - </para> - <para> - æåã®è¡ã§ã¯ãPEARãã£ã¬ã¯ããªãããã¡ã¤ã«ãèªã¿è¾¼ãã§ãã¾ãã - ããã¯ã - <classname>PEAR::Auth</classname> - ãå®è¡ããéã«å¿ è¦ãªã³ã¼ããå ¨ã¦å«ã¿ã¾ãã - ãã®å¾ããã°ã¤ã³ç»é¢ã表示ãã颿°ã1ã¤å®ç¾©ãã¾ãã - ãã®é¢æ°ã¯ã - ãã®ãã¼ã¸ãé²è¦§ããè ããã°ã¤ã³ãã¼ã¿ãå ¥åããããã«ä½¿ç¨ããã¾ãã - ãã®é¢æ°ã® - <acronym>HTML</acronym> - ãã©ã¼ãããã¯èªç±ã«å¤æ´ãããã¨ãåºæ¥ã¾ãã - </para> - <para> - <warning> - <simpara> - ãã®é¢æ°ã®HTMLãã©ã¼ãããã¯èªç±ã«å¤æ´ã§ãã¾ããã - inputããã¯ã¹ã®nameã¯å¤æ´ãã¦ã¯ããã¾ããã - ããã㯠- <literal>username</literal>ããã³<literal>password</literal> - ã¨ããå¿ è¦ãããã¾ãã - </simpara> - </warning> - </para> - <para> - ãã°ã¤ã³ãã¼ã¿ãæ¤è¨¼ããããã«ãã¼ã¿ãã¼ã¹ã使ç¨ããããã - ããã§ã夿°<varname>$dsn</varname>ã使ãã¾ãã - ãã®å¤æ°ã«ã¯ã - <link linkend="package.database.db">PEAR::DB</link> - ã«ãããã¼ã¿ãã¼ã¹ã¨æ¥ç¶ããéã«ä½¿ç¨ãããæå¹ãªDSNæååãæå®ãã¾ãã - ãã®ä»ã®ã¹ãã¬ã¼ã¸ã³ã³ããã使ç¨ãããå ´åã¯ã - å¾è¿°ãã詳細ãªèª¬æãåç §ä¸ããã - </para> - <para> - ãã®å¾ãç§ãã¡ã¯èªè¨¼ãªãã¸ã§ã¯ãã使ãã¾ãã - æåã®ãã©ã¡ã¼ã¿ã¼ã¯ãã¹ãã¬ã¼ã¸ã³ã³ããã®ååãå®ç¾©ãã¾ãã - ç§ãã¡ã¯ãã¼ã¿ãã¼ã¹ãæä½ããã¹ãã¬ã¼ã¸ã³ã³ããã使ç¨ãããã®ã§ã - ããã§ã¯"DB"ãæå®ãã¾ãã - 第2ã®ãã©ã¡ã¼ã¿ã¼ã¯ã³ã³ãããã©ã¤ãã®æ¥ç¶ãã©ã¡ã¼ã¿ã§ãã - ç§ãã¡ã¯ãããããå®ç¾©ããDSNæååã使ç¨ãã¾ãã - ç§ãã¡ã¯ä»¥åã«å®ç¾©ãããDSNã¹ããªã³ã°ã使ç¨ãã¾ãã - 3çªç®ã®ãã©ã¡ã¼ã¿ã¯ã - ã¹ã¯ãªããã®åãã«ç§ãã¡ãå®ç¾©ãã颿°ã®ååã§ãã - ããã¯ãã°ã¤ã³ãã©ã¼ã ãåºåãã¾ãã - </para> - <para> - ä»ãç§ãã¡ã®èªè¨¼ãªãã¸ã§ã¯ãã¯åæåã¨ãç§ãã¡ã¯ã - ã¦ã¼ã¶ããã°ã¤ã³ãã¦ãããã©ãããã§ãã¯ããå¿ è¦ãããã¾ãã - ããã¯<function>getAuth</function>ãéãã¦è¡ãã¾ãã - ããã&true;ãè¿ãå ´åã - ç§ãã¡ã¯ãã¼ã¸ã®å 容ãã¦ã¼ã¶ã¸æ¸¡ããã¨ãã§ãã¾ãã - </para> - <para> - <warning> - <para> - ä»ã®ã¨ãã<literal>register_globals=on</literal>㨠- <programlisting role="php"> - <![CDATA[ - $auth = new Auth(...); - ]]> - </programlisting> - ã¯<varname>$auth</varname> - ãã»ãã·ã§ã³å¤æ° - (<classname>PEAR::Auth</classname>ãå é¨ã§ä½¿ç¨ãã¾ã) - ã®ååãªã®ã§ã - <literal>register_globals=on</literal>ã§ã¯ä½¿ç¨åºæ¥ã¾ããã - </para> - <para> - For now one cannot use - <programlisting role="php"> - <![CDATA[ - $auth = new Auth(...); - ]]> - </programlisting> - with <literal>register_globals=on</literal>, because - <varname>$auth</varname> is also the name of the session variable, - that is internally used by <classname>PEAR::Auth</classname>. - </para> - </warning> - </para> - </example> - <example> - <title>ãªãã·ã§ã³ã®èªè¨¼ã®ä½¿ç¨</title> - <programlisting role="php"> - <![CDATA[ -require_once "Auth/Auth.php"; - -function loginFunction() -{ - /** - * Change the HTML output so that it fits to your - * application. - */ - echo "<form method=\"post\" action=\"" . $_SERVER['PHP_SELF'] . "?login=1\">"; - echo "<input type=\"text\" name=\"username\">"; - echo "<input type=\"password\" name=\"password\">"; - echo "<input type=\"submit\">"; - echo "</form>"; -} - -if (isset($_GET['login']) && $_GET['login'] == 1) { - $optional = true; -} else { - $optional = false; -} - -$dsn = "mysql://user:password@localhost/database"; -$a = new Auth("DB", $dsn, "loginFunction", $optional); - -$a->start(); - -echo "Everybody can see this text!<br />"; - -if (!isset($_GET['login'])) { - echo "<a href=\"test.php?login=1\">Click here to log in</a>\n"; -} - -if ($a->getAuth()) { - echo "One can only see this if he is logged in!"; -} - ]]> - </programlisting> - <para> - This is a pretty nice example for the optional login feature: The - last parameter <parameter>$optional</parameter> can be either &true; - or &false;. If it is &false;, the login form is not shown and the user - only sees the text "Everybody can see this text!". If he clicks on - the link above this text, he gets the same page but with the GET - parameter "login=1". Now he can enter his login information in the - login form. If he successfully logs in, he can then see the text - "Everybody can see this text!" and the text "One can only see this - if he is logged in!". - </para> - </example> - - <example> - <title>ãã°ã¢ã¦ãæ©è½æ§</title> - <simpara> - 次ã®ä¾ã¯ã«ã¬ã³ãã¦ã¼ã¶ã¼ã<quote>ãã°ã¢ã¦ã</quote>ãã - åã³ãã°ã¤ã³ãã©ã¼ã ã表示ãã¾ãã - </simpara> - <programlisting role="php"> -$myauth->start(); - -if ($_GET['action'] == "logout") { - $myauth->logout(); - $myauth->start(); -} - </programlisting> - </example> - - <para> - 次ã®ç¯ã§ã¯ã - ç§ãã¡ã¯<classname>PEAR::Auth</classname> - ã®æ©è½ã«é¢ããããå¤ãã®è©³ç´°æ å ±ãã«ãã¼ãã¾ãã - </para> - <para> - ãã®SQLæã¯MySQLã使ç¨ãã¦ã - ããã©ã«ãã®ãã¼ã¿ãã¼ã¹èªè¨¼ã¹ãã¼ã ã§ä½¿ç¨å¯è½ãªãã¼ãã«ã使ãã¾ãã - </para> - <programlisting role="sql"> - <![CDATA[ -CREATE TABLE auth ( - username VARCHAR(50) default '' NOT NULL, - password VARCHAR(32) default '' NOT NULL, - PRIMARY KEY (username), - KEY (password) -); - ]]> - </programlisting> - <para> - ãããã¯èªè¨¼ãå¦çãããã¨ã«å¿ è¦ãªãã¼ãã«ããã³ãã£ã¼ã«ãåã§ãã - The password column must be at least 32 characters - long because we store passwords encrypted using md5() and that is - the length of the values returned by md5(). - </para> - </refsect1> -</refentry> -<!-- Keep this comment at the end of the file -Local variables: -mode: sgml -sgml-omittag:t -sgml-shorttag:t -sgml-minimize-attributes:nil -sgml-always-quote-attributes:t -sgml-indent-step:1 -sgml-indent-data:t -sgml-parent-document:nil -sgml-default-dtd-file:"../../../../manual.ced" -sgml-exposed-tags:nil -sgml-local-catalogs:nil -sgml-local-ecat-files:nil -End: -vim600: syn=xml fen fdm=syntax fdl=2 si -vim: et tw=78 syn=sgml -vi: ts=1 sw=1 ---> +<!-- $Revision: 1.3 $ --> +<!-- EN-Revision: 1.7 Maintainer: haruki Status: ready --> +<refentry id="package.authentication.auth.intro"> + <refnamediv> + <refname>å°å ¥</refname> + <refpurpose>使ç¨ä¾</refpurpose> + </refnamediv> + <refsect1 id="packages.authentication.auth.intro.example"> + <title>Authã«ã¤ãã¦ã®ãã¥ã¼ããªã¢ã«</title> + <simpara> + ãã®"ãããã¥ã¼ããªã¢ã«"ã§ã¯ã + ç°¡åãªèªè¨¼æ©æ§ãå©ç¨ãã¦ã + ãµã¤ããã»ãã¥ã¢ã«ããã·ã¹ãã ãæ§ç¯ãããã¨ãç®æ¨ã¨ãã¾ãã + </simpara> + <para> + ã»ãã¥ã¢ã«ããããµã¤ãã®ã¯ããã«ã以ä¸ã®çãã³ã¼ããç½®ãã¦ã¿ã¾ãããã + </para> + <example> + <title><classname>PEAR::Auth</classname>ã®å ¸åçãªä½¿ç¨ä¾</title> + <programlisting role="php"> + <![CDATA[ +require_once "Auth/Auth.php"; + +function loginFunction() +{ + /** + * HTMLåºåã¯ã使ããã¢ããªã±ã¼ã·ã§ã³ã«åãããã«ã + * 夿´ãã¦ãã ããã + */ + echo "<form method=\"post\" action=\"" . $_SERVER['PHP_SELF'] . "\">"; + echo "<input type=\"text\" name=\"username\">"; + echo "<input type=\"password\" name=\"password\">"; + echo "<input type=\"submit\">"; + echo "</form>"; +} + +$dsn = "mysql://user:password@localhost/database"; +$a = new Auth("DB", $dsn, "loginFunction"); + +$a->start(); + +if ($a->getAuth()) { + /** + * ãµã¤ãã®åºåã¯ããã + */ +} + ]]> + </programlisting> + <para> + ãã®ãããªçãã³ã¼ãã§ããèªè¨¼ã·ã¹ãã ã®ä¾ã示ããã¨ãåºæ¥ã¾ãã + </para> + <para> + æåã®è¡ã§ã¯ãPEARãã£ã¬ã¯ããªãããã¡ã¤ã«ãèªã¿è¾¼ãã§ãã¾ãã + ãã®ãã¡ã¤ã«ã«ã¯ã<classname>PEAR::Auth</classname> + ã®å®è¡ã«å¿ è¦ãªã³ã¼ããå ¨ã¦å«ã¾ãã¦ãã¾ãã + 次ã«ããã¼ã¸ã®é²è¦§è ããã°ã¤ã³ãã¼ã¿ãå ¥åããããã«ä½¿ç¨ãã + ãã°ã¤ã³ãã©ã¼ã ã表示ãã颿°ãå®ç¾©ãã¾ãã + ãã®é¢æ°ã®<acronym>HTML</acronym> + ãã©ã¼ãããã¯èªç±ã«å¤æ´ãããã¨ãåºæ¥ã¾ãã + </para> + <para> + <warning> + <simpara> + æ¬é¢æ°ã®HTMLãã©ã¼ãããã¯èªç±ã«å¤æ´ã§ãã¾ããã + inputããã¯ã¹ã®nameã¯å¤æ´ãã¦ã¯ããã¾ããã + ãããã¯ã + <literal>username</literal>ããã³<literal>password</literal> + ã¨ããå¿ è¦ãããã¾ãã + </simpara> + </warning> + </para> + <para> + ãã®ä¾ã§ã¯ããã°ã¤ã³ãã¼ã¿ã®æ¤è¨¼ã«ãã¼ã¿ãã¼ã¹ã使ç¨ããã®ã§ã + 夿°<varname>$dsn</varname>ã使ãã¾ãã + ãã®å¤æ°ã«ã¯ã + <link linkend="package.database.db">PEAR::DB</link> + ã«ãããã¼ã¿ãã¼ã¹æ¥ç¶ã«ä½¿ãããæå¹ãªDSNæååãæå®ãã¾ãã + ããã©ã«ãã®ãã¼ãã«ã¹ãã¼ãã«ã¤ãã¦ãããã³ + ãã¼ã¿ãã¼ã¹ä»¥å¤ã®ã¹ãã¬ã¼ã¸ã³ã³ããã使ç¨ããæ¹æ³ã«ã¤ãã¦ã¯ã + å¾è¿°ã®èª¬æãåç §ä¸ããã + </para> + <para> + ãã®å¾ãèªè¨¼ãªãã¸ã§ã¯ãã使ãã¾ãã + ã¯ããã®ãã©ã¡ã¼ã¿ã«ã¯ãã¹ãã¬ã¼ã¸ã³ã³ããåãæå®ãã¾ãã + ããã§ã¯ããã¼ã¿ãã¼ã¹ã«ããã¹ãã¬ã¼ã¸ã³ã³ããã使ç¨ããã®ã§ã + "DB"ãæ¸¡ãã¾ãã + ï¼çªç®ã¯ã使ç¨ããã¹ãã¬ã¼ã¸ã³ã³ããã®ãã©ã¤ãã¸ã® + ã³ãã¯ã·ã§ã³å¼æ°ã§ãã + ããã§ã¯ãå®ç¾©æ¸ã®DSNæååã使ãã¾ãã + ï¼çªç®ã®ãã©ã¡ã¼ã¿ã¯ããã°ã¤ã³ãã©ã¼ã ã表示ãã颿°åã§ãã + </para> + <para> + ã¤ãã§ãèªè¨¼ãªãã¸ã§ã¯ããåæåãã¾ããããã¦ã + ã¦ã¼ã¶ããã°ã¤ã³ãã¦ãããã©ãã調ã¹ãå¿ è¦ãããã¾ãã + ããã¯ã<function>getAuth</function>ã¡ã½ããã«ããè¡ãã¾ãã + &true;ãè¿ãããã¨ããã¼ã¸ã®å 容ãã¦ã¼ã¶ã«ç¤ºããã¨ãã§ãã¾ãã + </para> + <para> + <warning> + <para> + ç¾å¨ã®ã¨ããã<literal>register_globals=on</literal>ã®å ´åã以ä¸ã®ã³ã¼ãã¯ä½¿ç¨ã§ãã¾ããã + <programlisting role="php"> + <![CDATA[ + $auth = new Auth(...); + ]]> + </programlisting> + ãã®çç±ã¯ã<varname>$auth</varname>ãã<classname>PEAR::Auth</classname>å é¨ã§ä½¿ç¨ããã¦ãã + ã»ãã·ã§ã³å¤æ°åã§ããããã§ãã + </para> + </warning> + </para> + </example> + <example> + <title>èªè¨¼ã®é¸æçãªä½¿ç¨</title> + <programlisting role="php"> + <![CDATA[ +require_once "Auth/Auth.php"; + +function loginFunction() +{ + /** + * HTMLåºåã¯ã使ããã¢ããªã±ã¼ã·ã§ã³ã«åãããã«ã + * 夿´ãã¦ãã ããã + */ + echo "<form method=\"post\" action=\"" . $_SERVER['PHP_SELF'] . "?login=1\">"; + echo "<input type=\"text\" name=\"username\">"; + echo "<input type=\"password\" name=\"password\">"; + echo "<input type=\"submit\">"; + echo "</form>"; +} + +if (isset($_GET['login']) && $_GET['login'] == 1) { + $optional = true; +} else { + $optional = false; +} + +$dsn = "mysql://user:password@localhost/database"; +$a = new Auth("DB", $dsn, "loginFunction", $optional); + +$a->start(); + +echo "ãã¹ã¦ã®äººããã®ããã¹ããèªãã¾ãã<br />"; + +if (!isset($_GET['login'])) { + echo "<a href=\"test.php?login=1\">ãã°ã¤ã³</a>\n"; +} + +if ($a->getAuth()) { + echo "ãã°ã¤ã³ãã人ã ããããããè¦ãã¾ãã"; +} + ]]> + </programlisting> + <para> + ä¸è¨ã¯ããã°ã¤ã³æ©è½ã鏿çã«ä½¿ç¨ããä¾ã§ãã + æå¾ã®<parameter>$optional</parameter>ãã©ã¡ã¼ã¿ã¯ã + &true;ã¾ãã¯&false;ã¨ãã¾ãã + &false;ã¨ããå ´åããã°ã¤ã³ãã©ã¼ã ã¯è¡¨ç¤ºãããã + ã¦ã¼ã¶ã¯ããã¹ã¦ã®äººããã®ããã¹ããèªãã¾ããã + ã®æã ããè¦ããã¨ãã§ãã¾ãã + ãããã¦ã¼ã¶ãããã®ãã¼ã¸ä¸é¨ã®ãªã³ã¯ãã¯ãªãã¯ããã¨ã + GETãã©ã¡ã¼ã¿ã"login=1"ã¨ãã¦ãåããã¼ã¸ã«æ¥ç¶ãã¾ãã + ä»åã¯ããã°ã¤ã³æ å ±ããã°ã¤ã³ãã©ã¼ã ã«å ¥åã§ãã¾ãã + ãã°ã¤ã³ã«æåããã¨ã + ããã¹ã¦ã®äººããã®ããã¹ããèªãã¾ãããã®æã¨ + ããã°ã¤ã³ãã人ã ããããããè¦ãã¾ããã + ã®æã®ä¸¡æ¹ãè¦ããã¨ãã§ãã¾ãã + </para> + </example> + + <example> + <title>ãã°ã¢ã¦ãæ©è½</title> + <simpara> + 以ä¸ã®ä¾ã§ã¯ãç¾å¨ã®ã¦ã¼ã¶ã<quote>logout</quote>ããã + ãã°ã¤ã³ãã©ã¼ã ãåã³è¡¨ç¤ºãã¾ãã + </simpara> + <programlisting role="php"> +$myauth->start(); + +if ($_GET['action'] == "logout") { + $myauth->logout(); + $myauth->start(); +} + </programlisting> + </example> + + <para> + 以ä¸ã§ã¯ã<classname>PEAR::Auth</classname>ã®æ©è½ã«ã¤ãã¦ã® + 詳細ã示ãã¾ãã + </para> + <para> + 次ã®SQLæã¯ãMySQLã使ç¨ãã¦ã + ãã¼ã¿ãã¼ã¹èªè¨¼ç¨ã®ããã©ã«ãã®ã¹ãã¼ã ã使ãã¾ãã + </para> + <programlisting role="sql"> + <![CDATA[ +CREATE TABLE auth ( + username VARCHAR(50) default '' NOT NULL, + password VARCHAR(32) default '' NOT NULL, + PRIMARY KEY (username), + KEY (password) +); + ]]> + </programlisting> + <para> + èªè¨¼ãæ©è½ãããããã«å¿ è¦ãªãã¼ãã«åã¨ãã£ã¼ã«ãåã示ããã¦ãã¾ãã + passwordã«ã©ã ã¯ãmd5()ã«ããæå·åããããã¹ã¯ã¼ããä¿æããããã«ã + å°ãªãã¨ãmd5()ã®å¸°ãå¤ã®é·ãã§ãã32æå以ä¸ã¨ããå¿ è¦ãããã¾ãã + </para> + </refsect1> +</refentry> +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> http://cvs.php.net/co.php/peardoc/ja/package/authentication/auth/constants.xml?r=1.1&p=1 Index: peardoc/ja/package/authentication/auth/constants.xml +++ peardoc/ja/package/authentication/auth/constants.xml <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.2 Maintainer: haruki Status: ready --> <refentry id="package.authentication.auth.constants"> <refnamediv> <refname>&title.constants;</refname> <refpurpose>&purpose.preconstants;</refpurpose> </refnamediv> <refsect1 id="package.authentication.auth.constants.auth-idled"> <title><constant>AUTH_IDLED</constant></title> <para> -1 </para> </refsect1> <refsect1 id="package.authentication.auth.constants.auth-expired"> <title><constant>AUTH_EXPIRED</constant></title> <para> -2 </para> </refsect1> <refsect1 id="package.authentication.auth.constants.auth-wrong-login"> <title><constant>AUTH_WRONG_LOGIN</constant></title> <para> -3 </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/ja/package/authentication/auth/intro-storage.xml?r=1.1&p=1 Index: peardoc/ja/package/authentication/auth/intro-storage.xml +++ peardoc/ja/package/authentication/auth/intro-storage.xml <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.11 Maintainer: haruki Status: ready --> <refentry id="package.authentication.auth.intro-storage"> <refnamediv> <refname>ã¹ãã¬ã¼ã¸ãã©ã¤ã</refname> <refpurpose>å°å ¥</refpurpose> </refnamediv> <refsect1 id="package.authentication.auth.intro.storage.overview"> <title>æ¦è¦</title> <para> <classname>PEAR::Auth</classname>ã§ã¯ã 種ã ã®ããããã¹ãã¬ã¼ã¸ã³ã³ããã使ç¨ã§ãã¾ãã 以ä¸ã§ã¯ãåã¹ãã¬ã¼ã¸ã³ã³ããã®è©³ç´°ã«ã¤ãã¦è¿°ã¹ã¾ãã ãããã³ã³ããã®ãããããããªãã®ãã¼ãºã«åè´ããªãå ´åã¯ã ç¬èªã®ãã®ã使ãããã¨ã容æã«å¯è½ã§ãã </para> </refsect1> <refsect1 id="package.authentication.auth.intro-storage.db"> <title>ãã¼ã¿ãã¼ã¹</title> <para> <classname>PEAR:Auth</classname>ã¯ã <link linkend="package.database.db"><classname>PEAR::DB</classname></link> æ½è±¡åã¬ã¤ã¤ã¼ã使ç¨ãã¾ãã ã¤ã¾ãããã°ã¤ã³ãã¼ã¿ãä¿æããããã«ã«ã DBæ½è±¡åã¬ã¤ã¤ã¼ããµãã¼ããããã¼ã¿ãã¼ã¹ããã©ãã§ã使ç¨ã§ãã¾ãã </para> <para> æ¬ã¹ãã¬ã¼ã¸ã使ç¨ããå ´åã <link linkend="package.authentication.auth.auth.auth"> <function>Auth constructor</function> </link>ã®å¼æ°ã¯é åã¨ãªãã¾ãã <table> <title>é åã®ãã¼ã¨å¤</title> <tgroup cols="3"> <thead> <row> <entry>ãã¼</entry> <entry>説æ</entry> <entry>ããã©ã«ãå¤</entry> </row> </thead> <tbody> <row> <entry><quote>dsn</quote></entry> <entry> æå¹ã§æ´å½¢å¼ã® <link linkend="package.database.db.intro-dsn"> DSN </link> </entry> <entry> <quote></quote> </entry> </row> <row> <entry><quote>table</quote></entry> <entry> èªè¨¼ãã¼ã¿ãä¿æããããã¼ã¿ãã¼ã¹ã®ãã¼ãã«å </entry> <entry> <quote>auth</quote> </entry> </row> <row> <entry><quote>usernamecol</quote></entry> <entry> ã¦ã¼ã¶åãä¿æãããã«ã©ã å </entry> <entry> <quote>username</quote> </entry> </row> <row> <entry><quote>passwordcol</quote></entry> <entry> MD5æå·åããããã¹ã¯ã¼ããä¿æãããã«ã©ã åã 32æå以ä¸ãä¿æå¯è½ã確èªãã¦ãã ããã </entry> <entry> <quote>password</quote> </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.authentication.auth.intro-storage.file"> <title>ãã¡ã¤ã«</title> <para> æ¬ã¹ãã¬ã¼ã¸ã使ç¨ããå ´åã <link linkend="package.authentication.auth.auth.auth"> <function>Auth constructor</function></link> ã®å¼æ°ã«ã¯ã <link linkend="package.filesystem.file-passwd.intro">passwdå½¢å¼</link>ã® ãã¡ã¤ã«åã§ãã </para> </refsect1> <refsect1 id="package.authentication.auth.intro-storage.smbpasswd"> <title>SMBPasswd</title> <para> ãã®ã¹ãã¬ã¼ã¸ã³ã³ããã¯ãSAMBAã®smbpasswdãã¡ã¤ã«ã使ã£ã¦èªè¨¼ã è¡ãã¾ãã æ¬ã¹ãã¬ã¼ã¸ã使ç¨ããå ´åã <link linkend="package.authentication.auth.auth.auth"> <function>Auth constructor</function></link> ã®å¼æ°ã¯ã <link linkend="package.filesystem.file-smbpasswd.intro">SAMBA passwdå½¢å¼</link>ã® ãã¡ã¤ã«åã§ãã </para> </refsect1> <refsect1 id="package.authentication.auth.intro-storage.imap"> <title>IMAP</title> <para> ãã®ã¹ãã¬ã¼ã¸ã³ã³ããã¯ãæå®ãããIMAPãµã¼ãã«æ¥ç¶ãã æå®ãããã¦ã¼ã¶åã»ãã¹ã¯ã¼ãã§ãã°ã¤ã³ãããã¨è©¦ã¿ã¾ãã </para> <para> æ¬ã¹ãã¬ã¼ã¸ã使ç¨ããå ´åã <link linkend="package.authentication.auth.auth.auth"> <function>Auth constructor</function></link> ã®å¼æ°ã¯ãé åã¨ãªãã¾ãã <table> <title>é åã®ãã¼ã¨å¤</title> <tgroup cols="3"> <thead> <row> <entry>ãã¼</entry> <entry>説æ</entry> <entry>ããã©ã«ãå¤</entry> </row> </thead> <tbody> <row> <entry><quote>host</quote></entry> <entry> IMAPãµã¼ãã®IPã¢ãã¬ã¹ã¾ãã¯ãã¹ãå </entry> <entry> <quote>localhost</quote> </entry> </row> <row> <entry><quote>port</quote></entry> <entry> IMAPãµã¼ããlisteningãã¦ãããã¼ã </entry> <entry> <quote>143</quote> </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.authentication.auth.intro-storage.ldap"> <title>LDAP</title> <para> æ¬ã¹ãã¬ã¼ã¸ã使ç¨ããå ´åã <link linkend="package.authentication.auth.auth.auth"> <function>Auth constructor</function></link> ã®å¼æ°ã¯ãé åã¨ãªãã¾ãã <table> <title>é åã®ãã¼ã¨å¤</title> <tgroup cols="3"> <thead> <row> <entry>ãã¼</entry> <entry>説æ</entry> <entry>ããã©ã«ãå¤</entry> </row> </thead> <tbody> <row> <entry><quote>host</quote></entry> <entry> ã¢ã¯ã»ã¹ãã¹ãIPã¢ãã¬ã¹ã¾ãã¯ãã¹ãå </entry> <entry> <quote>localhost</quote> </entry> </row> <row> <entry><quote>port</quote></entry> <entry> LDAPãµã¼ãã«æ¥ç¶ããããã®ãã¼ã </entry> <entry> <quote>389</quote> </entry> </row> <row> <entry><quote>basedn</quote></entry> <entry> ãã¼ã¹ã®åºå¥å </entry> <entry> <quote>o=netsols,c=de</quote> </entry> </row> <row> <entry><quote>userattr</quote></entry> <entry> ãªã¯ã¨ã¹ããã屿§å </entry> <entry> <quote>uid</quote> </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <!-- not release yet <refsect1 id="package.authentication.auth.intro-storage.mdb"> <title>MDB</title> <para> In addition to using <link linkend="package.database.db"> <classname>PEAR:DB</classname></link>, <classname>PEAR:Auth</classname> also can use the ><classname>MDB</classname> abstraction layer for database access. </para> <para> The storage-specific argument for the <link linkend="package.authentication.auth.auth.auth"> <function>Auth constructor</function> </link> is an array. <table> <title>Array keys and values</title> <tgroup cols="3"> <thead> <row> <entry>Key</entry> <entry>Description</entry> <entry>Default value</entry> </row> </thead> <tbody> <row> <entry><quote>dsn</quote></entry> <entry> A valid and well-formed <link linkend="package.database.db.intro-dsn"> DSN </link>. </entry> <entry> <quote></quote> </entry> </row> <row> <entry><quote>table</quote></entry> <entry> The name of the database table, where the authorization data is stored. </entry> <entry> <quote>auth</quote> </entry> </row> <row> <entry><quote>usernamecol</quote></entry> <entry> The name of the colunm, where the username is stored </entry> <entry> <quote>username</quote> </entry> </row> <row> <entry><quote>passwordcol</quote></entry> <entry> The name of the colunm, where the MD5-crypted password is stored. Make sure, that the password field can contain at least 32 bit. </entry> <entry> <quote>password</quote> </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> --> <refsect1 id="package.authentication.auth.intro-storage.pop3"> <title>POP3</title> <para> ãã®ã¹ãã¬ã¼ã¸ã³ã³ããã¯ãæå®ãããPOP3ãµã¼ãã«æ¥ç¶ãã æå®ãããã¦ã¼ã¶åã»ãã¹ã¯ã¼ãã§ãã°ã¤ã³ã試ã¿ã¾ãã </para> <para> æ¬ã¹ãã¬ã¼ã¸ã使ç¨ããå ´åã <link linkend="package.authentication.auth.auth.auth"> <function>Auth constructor</function></link> ã®å¼æ°ã¯ã<literal>server:port</literal>å½¢å¼ãã¾ãã¯åã« <literal>server</literal>å½¢å¼ã¨ãã¾ãã </para> </refsect1> <refsect1 id="package.authentication.auth.intro-storage.radius"> <title>RADIUS</title> <para> ãã®ã¹ãã¬ã¼ã¸ã³ã³ãããåä½ãããããã«ã¯ãPECL radiusãå¿ è¦ã§ãã </para> <para> æ¬ã¹ãã¬ã¼ã¸ã使ç¨ããå ´åã The storage-specific argument for the <link linkend="package.authentication.auth.auth.auth"> <function>Auth constructor</function></link> ã®å¼æ°ã¯ãé åã¨ãªãã¾ãã <table> <title>é åã®ãã¼ã¨å¤</title> <tgroup cols="3"> <thead> <row> <entry>ãã¼</entry> <entry>説æ</entry> <entry>ããã©ã«ãå¤</entry> </row> </thead> <tbody> <row> <entry><quote>servers</quote></entry> <entry> <para> RADIUSãµã¼ãã®é åã åãµã¼ãã¯ããã¹ãããã¼ããå ±æç§å¯éµï¼shared secretï¼ã ã¿ã¤ã ã¢ã¦ããæå¤§è©¦è¡æ°ããæãã </para> <para> ãã¹ã弿°ã«ã¯ãå®å ¨ä¿®é£¾ãã¡ã¤ã³å ã¾ãã¯ãããåºåãã®IPã¢ãã¬ã¹ãããã¹ãå½¢å¼ã§æå®ãã¾ãã ãã¼ã弿°ã«ã¯ããµã¼ãã«æ¥ç¶ããããã®UDPãã¼ããæå®ãã¾ãã ãã¼ã弿°ã«0ãä¸ããããå ´åã¯ã ãããã¯ã¼ã¯ãµã¼ãã¹ã®ãã¼ã¿ãã¼ã¹ä¸ã®radius/udpã®ã¨ã³ããªã 調ã¹ã¾ãã ã¨ã³ããªãè¦ã¤ããç¡ããã°ãRADIUSæ¨æºã®èªè¨¼ç¨ãã¼ã (1812)ã使ç¨ãã¾ãã å ±æç§å¯éµå¼æ°ã«ã¯ããµã¼ããã¹ãã«å¯¾ããå ±æç§å¯éµãæå®ãã¾ãã RADIUSãããã³ã«ã¯ãå ±æç§å¯éµã®128ãã¤ãç®ä»¥éãç¡è¦ãã¾ãã ã¿ã¤ã ã¢ã¦ã弿°ã«ã¯ããµã¼ãããã®å¿çã«å¯¾ããã¿ã¤ã ã¢ã¦ãã ç§åä½ã§æå®ãã¾ãã æå¤§è©¦è¡æ°ã«ã¯ãèªè¨¼ãæå¿µããã¾ã§ã« æå¤§ä½åèªè¨¼ãªã¯ã¨ã¹ããç¹°ãè¿ãããæå®ãã¾ãã </para> <para> æå¤§10ã®ãµã¼ããæå®ã§ãã¾ãã è¤æ°ã®ãµã¼ããæå®ãããå ´åã¯ã æå¹ãªã¬ã¹ãã³ã¹ãå¾ããããã åãµã¼ãã§æå¤§è©¦è¡æ°ã«éãããããã¾ã§ ã©ã¦ã³ãããã³å½¢å¼ã§è©¦è¡ãã¦ããã¾ãã </para> </entry> <entry> array(<quote>localhost</quote>, 0, <quote>testing123</quote>, 3, 3) </entry> </row> <row> <entry><quote>authtype</quote></entry> <entry> <para> ãªã¯ã¨ã¹ãã®èªè¨¼æ¹æ³ã PAP, CHAP_MD5, MSCHAPv1, MSCHAPv2ãæå®å¯è½ã </para> <para> åã¡ã½ãããã¨ã«ç°ãªãä¾åæ§ãåå¨ãã¾ãã PAP以å¤ã®ã¡ã½ããã¯ãCrypt_CHAPããã±ã¼ã¸ãå¿ è¦ã¨ãã¾ãã MS-CHAPã使ç¨ããå ´åã¯ãmhashæ¡å¼µãå¿ è¦ã§ãã </para> </entry> <entry> <quote>PAP</quote> </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.authentication.auth.intro-storage.soap"> <title>SOAP</title> <para> æ¬ã¹ãã¬ã¼ã¸ã使ç¨ããå ´åã The storage-specific argument for the <link linkend="package.authentication.auth.auth.auth"> <function>Auth constructor</function></link> ã®å¼æ°ã¯ãé åã¨ãªãã¾ãã <table> <title>é åã®ãã¼ã¨å¤</title> <tgroup cols="3"> <thead> <row> <entry>ãã¼</entry> <entry>説æ</entry> <entry>ããã©ã«ãå¤</entry> </row> </thead> <tbody> <row> <entry><quote>endpoint</quote></entry> <entry> 対象ãµã¼ãã¹ã®URI </entry> <entry /> </row> <row> <entry><quote>namespace</quote></entry> <entry> 対象WEBãµã¼ãã¹ã®ãã¼ã ã¹ãã¼ã¹ </entry> <entry /> </row> <row> <entry><quote>method</quote></entry> <entry> ã³ã¼ã«ãããSOAPã¡ã½ãã </entry> <entry /> </row> <row> <entry><quote>encoding</quote></entry> <entry> ã³ã³ãã³ãã®ã¨ã³ã³ã¼ãã£ã³ã° (ä¾ã<literal>utf8</literal>). </entry> <entry /> </row> <row> <entry><quote>usernamefield</quote></entry> <entry> ã¦ã¼ã¶åãä¿æããã¦ãããã£ã¼ã«ãå </entry> <entry /> </row> <row> <entry><quote>passwordfield</quote></entry> <entry> ãã¹ã¯ã¼ããä¿æããã¦ãããã£ã¼ã«ãå </entry> <entry /> </row> <!-- XXX: Document _features element --> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.authentication.auth.intro-storage.vpopmail"> <title>vpopmail</title> <para> ãã®ã³ã³ããã¯ãã¦ã¼ã¶åã¨ãã¹ã¯ã¼ãã®èªè¨¼ã« æ¢åã®vpopmailãµã¼ãã¹ã使ç¨ãã¾ãã </para> <para> æ¬ã¹ãã¬ã¼ã¸ã¯ã弿°ãè¦æ±ãã¾ããã </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->