cvs: peardoc /ja/package/authentication/auth constants.xml intro-storage.xml intro.xml

From: 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"を渡します。 + 2番目は、使用するストレージコンテナのドライバへの + コネクション引数です。 + ここでは、定義済の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>内部で使用されている + セッション変数名であるためです。 + </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 -->
« previous php.pear.doc (#2816) next »