cvs: peardoc /fr/package/authentication/auth constants.xml intro-storage.xml intro.xml /fr/package/authentication/auth/auth auth.xml getauth.xml
getstatus.xml setexpire.xml setsessionname.xml start.xml

From: Date: Fri, 18 Jun 2004 07:36:09 +0000
Subject: cvs: peardoc /fr/package/authentication/auth constants.xml intro-storage.xml intro.xml /fr/package/authentication/auth/auth auth.xml getauth.xml
getstatus.xml setexpire.xml setsessionname.xml start.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-4443@lists.php.net to get a copy of this message
moosh Fri Jun 18 03:36:09 2004 EDT Added files: /peardoc/fr/package/authentication/auth constants.xml intro-storage.xml intro.xml /peardoc/fr/package/authentication/auth/auth auth.xml getauth.xml getstatus.xml setexpire.xml setsessionname.xml start.xml Log: initial translation

http://cvs.php.net/co.php/peardoc/fr/package/authentication/auth/constants.xml?r=1.1&p=1 Index: peardoc/fr/package/authentication/auth/constants.xml +++ peardoc/fr/package/authentication/auth/constants.xml <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.8 Maintainer: moosh 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/fr/package/authentication/auth/intro-storage.xml?r=1.1&p=1 Index: peardoc/fr/package/authentication/auth/intro-storage.xml +++ peardoc/fr/package/authentication/auth/intro-storage.xml <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.12 Maintainer: moosh Status: start --> <refentry id="package.authentication.auth.intro-storage"> <refnamediv> <refname>Drivers pour le stockage</refname> <refpurpose>Introduction</refpurpose> </refnamediv> <refsect1 id="package.authentication.auth.intro.storage.overview"> <title>Vue d'ensemble</title> <para> <classname>PEAR::Auth</classname> uses a number of so called storage containers to store the login data. The following passages describe all of them. If the containers that come with the package don't fit your needs, it is easy to create custom ones, also. </para> </refsect1> <refsect1 id="package.authentication.auth.intro-storage.db"> <title>Database</title> <para> <classname>PEAR:Auth</classname> uses the <link linkend="package.database.db"><classname>PEAR::DB</classname></link> abstraction layer for database access. That means that you can use all databases that are supported by the DB abstraction layer to store the login data. </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>Cl&eacute;s et valeurs des tableaux</title> <tgroup cols="3"> <thead> <row> <entry>Cl&eacute;</entry> <entry>Description</entry> <entry>Valeur d&eacute;faut</entry> </row> </thead> <tbody> <row> <entry><quote>dsn</quote></entry> <entry> Un <link linkend="package.database.db.intro-dsn"> DSN </link> valide et bien form&eacute;. </entry> <entry> <quote></quote> </entry> </row> <row> <entry><quote>table</quote></entry> <entry> Le nom de la table de la base de donn&eacute;es, o&ugrave; les donn&eacute;es d'authorisation seront stock&eacute;es </entry> <entry> <quote>auth</quote> </entry> </row> <row> <entry><quote>usernamecol</quote></entry> <entry> Le nom de la colonne o&ugrave; le nom d'utilisateur est enregistr&eacute;. </entry> <entry> <quote>username</quote> </entry> </row> <row> <entry><quote>passwordcol</quote></entry> <entry> Le nom de la colonne o&ugrave; le mot de passe crypt&eacute; par MD5 est enregistr&eacute;. Veillez &agrave; ce que le champs accepte un minimum de 32 caract&egrave;res. </entry> <entry> <quote>password</quote> </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.authentication.auth.intro-storage.file"> <title>Fichier</title> <para> The storage-specific argument for the <link linkend="package.authentication.auth.auth.auth"> <function>Auth constructor</function></link> is the file name of the <link linkend="package.filesystem.file-passwd.intro">passwd-style</link> file. </para> </refsect1> <refsect1 id="package.authentication.auth.intro-storage.smbpasswd"> <title>SMBPasswd</title> <para> This storage container provides authentication against SAMBA smbpasswd files. The storage-specific argument for the <link linkend="package.authentication.auth.auth.auth"> <function>Auth constructor</function></link> is the file name of the <link linkend="package.filesystem.file-smbpasswd.intro">SAMBA passwd-style</link> file. </para> </refsect1> <refsect1 id="package.authentication.auth.intro-storage.imap"> <title>IMAP</title> <para> This storage container connects to the specified IMAP server and tries to login there with the specified username/password. </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>host</quote></entry> <entry> The hostname or the IP address of the IMAP server </entry> <entry> <quote>localhost</quote> </entry> </row> <row> <entry><quote>port</quote></entry> <entry> Le port du serveur IMAP </entry> <entry> <quote>143</quote> </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.authentication.auth.intro-storage.ldap"> <title>LDAP</title> <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>Cl&eacute;</entry> <entry>Description</entry> <entry>Valeur par d&eacute;faut</entry> </row> </thead> <tbody> <row> <entry><quote>host</quote></entry> <entry> The host name or IP-adress to access Le hostname ou l'adresse IP d'acc&egrave;s </entry> <entry> <quote>localhost</quote> </entry> </row> <row> <entry><quote>port</quote></entry> <entry> Le port du serveur LDAP </entry> <entry> <quote>389</quote> </entry> </row> <row> <entry><quote>basedn</quote></entry> <entry> The base distinguished name </entry> <entry> <quote>o=netsols,c=de</quote> </entry> </row> <row> <entry><quote>userattr</quote></entry> <entry> Defines the attributes to request </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> This storage container connects to the specified POP3 server and tries to login there with the specified username/password. </para> <para> The storage-specific argument for the <link linkend="package.authentication.auth.auth.auth"> <function>Auth constructor</function></link> is a string of the form <literal>server:port</literal> or just <literal>server</literal>. </para> </refsect1> <refsect1 id="package.authentication.auth.intro-storage.radius"> <title>RADIUS</title> <para> You need Auth_RADIUS and the PECL radius in order to get this container to work. </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>servers</quote></entry> <entry> <para> Array of RADIUS servers, containing: host, port, shared secret, timeout, maxtries. </para> <para> The host parameter specifies the server host, either as a fully qualified domain name or as a dotted-quad IP address in text form. The port parameter specifies the UDP port to contact on the server. If port is given as 0, the library looks up the radius/udp entry in the network services database, and uses the port found there. If no entry is found, the library uses the standard RADIUS port for authentication (1812). The shared secret for the server host is passed to the secret parameter. The RADIUS protocol ignores all but the leading 128 bytes of the shared secret. The timeout for receiving replies from the server is passed to the timeout parameter, in units of seconds. The maximum number of repeated requests to make before giving up is passed into the maxtries parameter. </para> <para> At most 10 servers may be specified. When multiple servers are given, they are tried in round-robin fashion until a valid response is received, or until each server's maxtries limit has been reached. </para> </entry> <entry> array(<quote>localhost</quote>, 0, <quote>testing123</quote>, 3, 3) </entry> </row> <row> <entry><quote>authtype</quote></entry> <entry> <para> The authentication method for validating the request. Possible values are: PAP, CHAP_MD5, MSCHAPv1, MSCHAPv2. </para> <para> There are dependencies for the different methods. For all authentication methods except PAP you need the Crypt_CHAP package, when you are using MS-CHAP you need also the mhash extension. </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> 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>endpoint</quote></entry> <entry> The URI where the service is located. </entry> <entry /> </row> <row> <entry><quote>namespace</quote></entry> <entry> The namespace of the web service. </entry> <entry /> </row> <row> <entry><quote>method</quote></entry> <entry> The SOAP method you wish to call. </entry> <entry /> </row> <row> <entry><quote>encoding</quote></entry> <entry> The content encoding that should be used (e.g. <literal>utf8</literal>). </entry> <entry /> </row> <row> <entry><quote>usernamefield</quote></entry> <entry> The name of the field where the username is stored. </entry> <entry /> </row> <row> <entry><quote>passwordfield</quote></entry> <entry> The name of the field where the password is stored. </entry> <entry /> </row> <!-- XXX: Document _features element --> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.authentication.auth.intro-storage.vpopmail"> <title>vpopmail</title> <para> This container uses an existing vpopmail service to validate the username and the password. </para> <para> It does not require any storage-specific argument. </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/fr/package/authentication/auth/intro.xml?r=1.1&p=1 Index: peardoc/fr/package/authentication/auth/intro.xml +++ peardoc/fr/package/authentication/auth/intro.xml <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.8 Maintainer: moosh Status: start --> <refentry id="package.authentication.auth.intro"> <refnamediv> <refname>Introduction</refname> <refpurpose>A usage example</refpurpose> </refnamediv> <refsect1 id="packages.authentication.auth.intro.example"> <title>Auth tutorial</title> <simpara> Our goal during this "mini tutorial" is to set up a system that secures your site with an easy to use authentication mechanism. </simpara> <para> At the top of the site to secured, place the following code snippet: </para> <example> <title>Typical usage example for <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> This few lines of code instantiate the authentication system. </para> <para> The first line in the above script includes the file from your PEAR directory. It contains all the necessary code to run <classname>PEAR::Auth</classname>. Next, we define a function to display the login form which the visitor of your page has to use to enter his login data. You can change all the <acronym>HTML</acronym> formatting in this function. </para> <para> <warning> <simpara> You can change all the HTML formatting in the function, but you cannot change the names of the input boxes in the form. They have to be <literal>username</literal> and <literal>password</literal>. </simpara> </warning> </para> <para> Since we want to use a database to verify the login data, we now create the variable <varname>$dsn</varname>, it contains a valid DSN string that will be used to connect to the database via <link linkend="package.database.db">PEAR::DB</link>. For the default database table schema or to use a different storage container, please see below for more information. </para> <para> After that we create the authentication object. The first parameter defines the name of the storage container. Because we want to use a database driven storage container, we pass "DB" here. The second parameter is the connection parameter for the container driver. We use the previously defined DSN string. The third parameter is the name of our function that we defined at the beginning of the script. It prints the login form. </para> <para> Now our authentication object is initialized and we need to check if the user is logged in. This is done via the method <function>getAuth</function>. If it returns &true;, we can pass the content of our page to the user. </para> <para> <warning> <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>Using optional authentication</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>Logout functionality</title> <simpara> The following example performs a <quote>logout</quote> for the current user and displays the login form again. </simpara> <programlisting role="php"> $myauth->start(); if ($_GET['action'] == "logout") { $myauth->logout(); $myauth->start(); } </programlisting> </example> <para> In the following passages we cover more detailed information about the functions of <classname>PEAR::Auth</classname>. </para> <para> This SQL statement creates a table usable under the default database authentication scheme using 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> These are the table and field names necessary for working authentication. When hashing the passwords with the MD5 algorithm, which is the default encryption method in <classname>PEAR::Auth</classname>, the password column must be at least 32 characters long. When using another encryption method like <acronym>DES</acronym> (<quote>UNIX <command>crypt</command></quote>), the column size has to be changed correspondingly. </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/fr/package/authentication/auth/auth/auth.xml?r=1.1&p=1 Index: peardoc/fr/package/authentication/auth/auth/auth.xml +++ peardoc/fr/package/authentication/auth/auth/auth.xml <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.8 Maintainer: moosh Status: ready --> <refentry id="package.authentication.auth.auth.auth"> <refnamediv> <refname>Auth::Auth()</refname> <refpurpose>constructeur</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcprototype> <funcdef><function>Auth::Auth</function></funcdef> <paramdef>cha&icirc;ne <parameter>$storageDriver = "DB"</parameter></paramdef> <paramdef>mixed <parameter>$options = ""</parameter></paramdef> <paramdef>cha&icirc;ne <parameter>$fonctionDIdentification = ""</parameter></paramdef> <paramdef>bool&eacute;en <parameter><optional>$showLogin = &true;</optional></parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.authentication.auth.auth.auth.desc"> &title.desc; <para> Constructeur pour le syst&egrave;me d'authentification. </para> </refsect1> <refsect1 id="package.authentication.auth.auth.auth.parameter"> &title.param; <para> <variablelist> <varlistentry> <term> &type.string; <parameter>$storageDriver</parameter> </term> <listitem> <para> nom du driver de stockage qui devra &ecirc;tre employ&eacute; </para> </listitem> </varlistentry> <varlistentry> <term> &type.mixed; <parameter>$options</parameter> </term> <listitem> <para> options qui sont pass&eacute;es au le conteneur de stockage </para> </listitem> </varlistentry> <varlistentry> <term> &type.string; <parameter>$fonctionDIdentification</parameter> </term> <listitem> <para> le nom d'une fonction utilisateur qui affiche l'&eacute;cran d'ouverture </para> </listitem> </varlistentry> <varlistentry> <term> &type.bool; <parameter>$showLogin</parameter> </term> <listitem> <para> d&eacute;finit si l'identification est facultative ou pas </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 id="package.authentication.auth.auth.auth.note"> &title.note; &note.notstatic; </refsect1> <refsect1 id="package.authentication.auth.auth.auth.see"> &title.see; <para> <link linkend="package.authentication.auth.intro-storage"> Introduction - les drivers de stockage </link> </para> </refsect1> <refsect1 id="package.authentication.auth.auth.auth.example"> &title.example; <example> <title>Utilisation de diff&eacute;rents param&egrave;tres de DB</title> <programlisting role="php"> <![CDATA[ <?php require_once "Auth/Auth.php"; function myOutput($username, $status) { ... /** Regardez l'example un pour le source complet */ } $params = array( "dsn" => "mysql://martin:test@localhost/auth", "table" => "myAuth", "usernamecol" => "myUserColumn", "passwordcol" => "myPasswordColumn" ); $a = new Auth("DB", $params, "myOutput"); $a->start(); if ($a->getAuth()) { echo "Vous avez &eacute;t&eacute; correctement identifi&eacute;."; } ?> ]]> </programlisting> </example> <para> Cet exemple vous montre comment vous pouvez donner des des noms diff&eacute;rents pour les noms de la table de base de donn&eacute;es et pour les noms de colonne. Dans notre exemple, nous employons la table myAuth, choisissons le username &agrave; partir du champs myUserColumn et le mot de passe &agrave; partir du champs myPasswordColumn. Les valeurs par d&eacute;faut pour ces champs sont auth, username et password. Note that you can also specify an existing DB object with the dsn parameter instead of a DSN. Notez que vous pouvez &eacute;galement indiquer un objet DB existant avec les param&egrave;tre de DSN au lieu d'un DSN. </para> <para> This feature is necessary if you want to use PEAR::Auth with a database layout that is different from the one PEAR::Auth uses by default. </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/fr/package/authentication/auth/auth/getauth.xml?r=1.1&p=1 Index: peardoc/fr/package/authentication/auth/auth/getauth.xml +++ peardoc/fr/package/authentication/auth/auth/getauth.xml <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.3 Maintainer: moosh Status: ready --> <refentry id="package.authentication.auth.auth.getauth"> <refnamediv> <refname>Auth::getAuth()</refname> <refpurpose> v&eacute;rifie l'authentification d'un utilisateur </refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcprototype> <funcdef>boolean <function>Auth_HTTP::getAuth</function></funcdef> <paramdef></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.authentication.auth.auth.getauth.desc"> &title.desc; <para> V&eacute;rifie si un utilisateur est authentifi&eacute; </para> </refsect1> <refsect1 id="package.authentication.auth.auth.getauth.return"> &title.returns; <para> <parameter>bool&eacute;en</parameter> - Si l'utilisateur a &eacute;t&eacute; d&eacute;j&agrave; authentifi&eacute;, la fonction renvoie &true;. Autrement elle renvoie &false;. </para> </refsect1> <refsect1 id="package.authentication.auth.auth.getauth.note"> &title.note; &note.notstatic; </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/fr/package/authentication/auth/auth/getstatus.xml?r=1.1&p=1 Index: peardoc/fr/package/authentication/auth/auth/getstatus.xml +++ peardoc/fr/package/authentication/auth/auth/getstatus.xml <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.4 Maintainer: moosh Status: ready --> <refentry id="package.authentication.auth.auth.getstatus"> <refnamediv> <refname>Auth::getStatus()</refname> <refpurpose> retourne l'&eacute;tat de l'authentification en cours </refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcprototype> <funcdef>cha&icirc;ne <function>Auth::getStatus</function> </funcdef> <paramdef></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.authentication.auth.auth.getstatus.desc"> &title.desc; <para> Cette fonction renvoie l'&eacute;tat actuel de PEAR::Auth. La valeur de retour est une des constantes qui sont d&eacute;finies par PEAR::Auth. </para> </refsect1> <refsect1 id="package.authentication.auth.auth.getstatus.return"> &title.returns; <para> <parameter>cha&icirc;ne</parameter> - les valeurs possibles sont <constant>AUTH_IDLED</constant>, <constant>AUTH_EXPIRED</constant>, <constant>AUTH_WRONG_LOGIN</constant> </para> </refsect1> <refsect1 id="package.authentication.auth.auth.getstatus.note"> &title.note; &note.notstatic; </refsect1> <refsect1 id="package.authentication.auth.auth.getstatus.see"> &title.see; <para> <link linkend="package.authentication.auth.constants">Vue d'ensemble de constantes de PEAR::Auth</link> </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/fr/package/authentication/auth/auth/setexpire.xml?r=1.1&p=1 Index: peardoc/fr/package/authentication/auth/auth/setexpire.xml +++ peardoc/fr/package/authentication/auth/auth/setexpire.xml <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.3 Maintainer: moosh Status: ready --> <refentry id="package.authentication.auth.auth.setexpire"> <refnamediv> <refname>Auth::setExpire()</refname> <refpurpose>Fixe un d&eacute;lai d'expiration pour l'authentification</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcprototype> <funcdef>void <function>Auth::setExpire</function></funcdef> <paramdef> entier <parameter>$delai</parameter> </paramdef> <paramdef> bool&eacute;en <parameter><optional>$prolonge = &false;</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.authentication.auth.auth.setexpire.desc"> &title.desc; <para> Avec cette fonction vous pouvez placer le d&eacute;lai avant expiration qui sera consid&eacute;&eacute; par Auth pour toute une nouvelle valeur. </para> </refsect1> <refsect1 id="package.authentication.auth.auth.setexpire.parameter"> &title.param; <para> <variablelist> <varlistentry> <term> &type.int; <parameter>$delai</parameter> </term> <listitem> <para> d&eacute;lai en nombre de secondes </para> </listitem> </varlistentry> <varlistentry> <term> &type.bool; <parameter>$prolonge</parameter> </term> <listitem> <para> Si &true; <parameter>$delai</parameter> est ajout&eacute; au temps actuel, Si &false; la valeur actuelle est &eacute;cras&eacute;e. </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 id="package.authentication.auth.auth.setexpire.note"> &title.note; &note.notstatic; </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/fr/package/authentication/auth/auth/setsessionname.xml?r=1.1&p=1 Index: peardoc/fr/package/authentication/auth/auth/setsessionname.xml +++ peardoc/fr/package/authentication/auth/auth/setsessionname.xml <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.2 Maintainer: moosh Status: ready --> <refentry id="package.authentication.auth.auth.setsessionname"> <refnamediv> <refname>Auth::setSessionname()</refname> <refpurpose>Fixe le nom de la session</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcprototype> <funcdef>void <function>Auth::setSessionname</function></funcdef> <paramdef>cha&icirc;ne <parameter>nom</parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.authentication.auth.auth.setsessionname.desc"> &title.desc; <para> Cette fonction peut fixer un nom adapt&eacute; &agrave; la session qui sera cr&eacute;ee pendant la proc&eacute;dure de login. Le nom par d&eacute;faut est celui de php, soit &quot;PHPSESSID&quot;. </para> </refsect1> <refsect1 id="package.authentication.auth.auth.setsessionname.parameter"> &title.param; <para> <variablelist> <varlistentry> <term> &type.string; <parameter>$nom</parameter> </term> <listitem> <para> le nom de session &agrave; utiliser </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 id="package.authentication.auth.auth.setsessionname.note"> &title.note; &note.notstatic; <para> Vous devez employer <function>setSessionname</function>, si vous executez plusieurs applications utilisant Auth sur le m&ecirc;me domaine. Si vous n'employez pas cette fonction, un utilisateur qui s'est authentifi&eacute; dans une des applications peut &eacute;galement employer les autres applications sans s'y identifier ! </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/fr/package/authentication/auth/auth/start.xml?r=1.1&p=1 Index: peardoc/fr/package/authentication/auth/auth/start.xml +++ peardoc/fr/package/authentication/auth/auth/start.xml <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.2 Maintainer: moosh Status: ready --> <refentry id="package.authentication.auth.auth.start"> <refnamediv> <refname>Auth::start()</refname> <refpurpose>d&eacute;marre l'authentification</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcprototype> <funcdef>void <function>Auth::start</function></funcdef> <paramdef></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.authentication.auth.auth.start.desc"> &title.desc; <para> Entame une proc&eacute;dure d'authentification. </para> </refsect1> <refsect1 id="package.authentication.auth.auth.start.note"> &title.note; &note.notstatic; </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 (#4443) next »