cvs: peardoc /fr/package/authentication/auth-http/auth-http auth-http.xml example.xml example2.xml getauth.xml getstatus.xml start.xml
| From: | Yannick Torres | Date: | Sat, 23 Dec 2006 14:28:01 +0000 |
| Subject: | cvs: peardoc /fr/package/authentication/auth-http/auth-http auth-http.xml example.xml example2.xml getauth.xml getstatus.xml start.xml | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-9140@lists.php.net to get a copy of this message | ||
yannick Sat Dec 23 14:28:01 2006 UTC
Modified files:
/peardoc/fr/package/authentication/auth-http/auth-http
auth-http.xml
example2.xml
example.xml
getauth.xml
getstatus.xml
start.xml
Log:
- WS
- typo
http://cvs.php.net/viewvc.cgi/peardoc/fr/package/authentication/auth-http/auth-http/auth-http.xml?r1=1.3&r2=1.4&diff_format=u Index: peardoc/fr/package/authentication/auth-http/auth-http/auth-http.xml diff -u peardoc/fr/package/authentication/auth-http/auth-http/auth-http.xml:1.3 peardoc/fr/package/authentication/auth-http/auth-http/auth-http.xml:1.4 --- peardoc/fr/package/authentication/auth-http/auth-http/auth-http.xml:1.3 Sat Dec 23 13:53:24 2006 +++ peardoc/fr/package/authentication/auth-http/auth-http/auth-http.xml Sat Dec 23 14:28:01 2006 @@ -1,19 +1,20 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.3 $ --> -<!-- EN-Revision: 1.4 Maintainer: moosh Status: ready $Date: 2006/12/23 13:53:24 $ --> +<!-- $Revision: 1.4 $ --> +<!-- EN-Revision: 1.4 Maintainer: moosh Status: ready --> + <refentry id="package.authentication.auth-http.auth-http.auth-http.auth-http"> <refnamediv> <refname>Auth_HTTP::Auth_HTTP()</refname> - <refpurpose>constructor</refpurpose> + <refpurpose>Constructeur</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcprototype> - <funcdef>&type.void; <function>Auth_HTTP::Auth_HTTP</function></funcdef> - <paramdef>&type.string; + <funcdef>void <function>Auth_HTTP::Auth_HTTP</function></funcdef> + <paramdef>string <parameter><optional>$driverDeStockage = "DB"</optional></parameter> </paramdef> - <paramdef>&type.mixed; + <paramdef>mixed <parameter><optional>$options = ""</optional></parameter> </paramdef> </funcprototype> @@ -22,9 +23,9 @@ <refsect1 id="package.authentication.auth-http.auth-http.auth-http.auth-http.desc"> &title.desc; <para> - Constructeur pour le système d'authentification + Constructeur pour le système d'identification. </para> - </refsect1> + </refsect1> <refsect1 id="package.authentication.auth-http.auth-http.auth-http.auth-http.parameter"> &title.param; <para> @@ -36,11 +37,11 @@ </term> <listitem> <para> - nom du driver de stockage qui doit être utilisé + nom du driver de stockage qui doit être utilisé </para> - </listitem> + </listitem> </varlistentry> - <varlistentry> + <varlistentry> <term> &type.mixed; <parameter>$options</parameter> @@ -48,18 +49,18 @@ <listitem> <para> une chaîne contenant des information d'identification - ou un tableau contenant une série d'option - pour le driver de stockage - </para> - </listitem> + ou un tableau contenant une série d'option + pour le driver de stockage + </para> + </listitem> </varlistentry> - </variablelist> + </variablelist> </para> - </refsect1> + </refsect1> <refsect1 id="package.authentication.auth-http.auth-http.auth-http.auth-http.note"> &title.note; ¬e.notstatic; - </refsect1> + </refsect1> <refsect1 id="package.authentication.auth-http.auth-http.auth-http.auth-http.example"> &title.example; <example> @@ -70,12 +71,13 @@ $a = new Auth_HTTP("DB", "mysql://test:test@localhost/test"); -$a->start(); +$a->start(); ]]> </programlisting> </example> - </refsect1> + </refsect1> </refentry> + <!-- Keep this comment at the end of the file Local variables: mode: sgml @@ -94,4 +96,4 @@ vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 ---> +--> \ No newline at end of file http://cvs.php.net/viewvc.cgi/peardoc/fr/package/authentication/auth-http/auth-http/example2.xml?r1=1.6&r2=1.7&diff_format=u Index: peardoc/fr/package/authentication/auth-http/auth-http/example2.xml diff -u peardoc/fr/package/authentication/auth-http/auth-http/example2.xml:1.6 peardoc/fr/package/authentication/auth-http/auth-http/example2.xml:1.7 --- peardoc/fr/package/authentication/auth-http/auth-http/example2.xml:1.6 Sat Dec 23 13:53:24 2006 +++ peardoc/fr/package/authentication/auth-http/auth-http/example2.xml Sat Dec 23 14:28:01 2006 @@ -1,56 +1,55 @@ <?xml version="1.0" encoding="iso-8859-1" ?> <!-- EN-Revision: 1.5 Maintainer: moosh Status: ready --> -<!-- $Revision: 1.6 $ --> +<!-- $Revision: 1.7 $ --> <refentry id="package.authentication.auth-http.auth-http.example2"> <refnamediv> - <refname>Exemple 2 Auth_HTTP</refname> + <refname>Auth_HTTP : Exemple 2</refname> <refpurpose> - Exemple: - Une page protegée par mot de passe - avec plusieurs rang trouvé et un mot de passe md5 + Exemple: + Une page protegée par mot de passe avec plusieurs rang trouvé + et un mot de passe md5 </refpurpose> </refnamediv> <refsect1> &title.example; <programlisting role="php"> -<![CDATA[ -<?php -// exemple d'implémentation de Auth_HTTP avec mot de passe crypté (md5) +<![CDATA[ +<?php +// Exemple d'implémentation de Auth_HTTP avec mot de passe crypté (md5) // et une récupération de colonnes annexes. require_once("Auth/HTTP.php"); -// connexion à la base +// Connexion à la base $AuthOptions = array( 'dsn'=>"pgsql://test:test@localhost/testdb", -'table'=>"testable", // Nom de votre table -'usernamecol'=>"username", // Nom de la colonne contenant le nom d'utilisateur -'passwordcol'=>"password", // Nom de la colonne contenant le mot de passe -'cryptType'=>"md5", // Type de cryptage du mot de passe dans la BD -'db_fields'=>"*" // active la récupération des données des autres colonnes +'table'=>"testable", // Nom de votre table +'usernamecol'=>"username", // Nom de la colonne contenant le nom d'utilisateur +'passwordcol'=>"password", // Nom de la colonne contenant le mot de passe +'cryptType'=>"md5", // Type de cryptage du mot de passe dans la BD +'db_fields'=>"*" // Active la récupération des données des autres colonnes ); - $a = new Auth_HTTP("DB", $AuthOptions); -$a->setRealm('votreRoyaume'); // nom du royaume (ensemble de l'espace protégé) -$a->setCancelText('<h2>Erreur 401</h2>'); // message d'erreur en cas d'echec -$a->start(); // démarrage de la procédure d'authentification. +$a->setRealm('votreRoyaume'); // Nom du royaume (ensemble de l'espace protégé) +$a->setCancelText('<h2>Erreur 401</h2>'); // Message d'erreur en cas d'echec +$a->start(); // Démarrage de la procédure d'authentification. -if($a->getAuth()) // en cas de réussite -{ - echo "Salut ".$a->username." bienvenue dans ma page protégée"; - echo "Nos info sur vous: <BR>"; - echo $a->getAuthData('userid'); // On a retrouvé d'autres info dans la table - echo $a->getAuthData('telephone'); // Dans cet exemple, l'id user, son téléphone - echo $a->getAuthData('email'); // et son adresse email. +if($a->getAuth()) { // en cas de réussite + echo "Salut ".$a->username." bienvenue dans ma page protégée"; + echo "Nos info sur vous: <BR>"; + echo $a->getAuthData('userid'); // On a retrouvé d'autres info dans la table + echo $a->getAuthData('telephone'); // Dans cet exemple, l'id user, son téléphone + echo $a->getAuthData('email'); // et son adresse email. }; ?> - ]]> +]]> </programlisting> </refsect1> </refentry> + <!-- Keep this comment at the end of the file Local variables: mode: sgml @@ -69,4 +68,4 @@ vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 ---> +--> \ No newline at end of file http://cvs.php.net/viewvc.cgi/peardoc/fr/package/authentication/auth-http/auth-http/example.xml?r1=1.6&r2=1.7&diff_format=u Index: peardoc/fr/package/authentication/auth-http/auth-http/example.xml diff -u peardoc/fr/package/authentication/auth-http/auth-http/example.xml:1.6 peardoc/fr/package/authentication/auth-http/auth-http/example.xml:1.7 --- peardoc/fr/package/authentication/auth-http/auth-http/example.xml:1.6 Sat Dec 23 13:53:24 2006 +++ peardoc/fr/package/authentication/auth-http/auth-http/example.xml Sat Dec 23 14:28:01 2006 @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="iso-8859-1" ?> +<!-- $Revision: 1.7 $ --> <!-- EN-Revision: 1.3 Maintainer: moosh Status: ready --> -<!-- $Revision: 1.6 $ --> + <refentry id="package.authentication.auth-http.auth-http.example"> <refnamediv> <refname>Exemple Auth_HTTP</refname> @@ -12,39 +13,36 @@ <![CDATA[ <?php -// exemple of Auth_HTTP basic implementation +// Exemple d'implémentation de Auth_HTTP require_once("Auth/HTTP.php"); -// Options de connexion à la base de donnée. +// Options de connexion à la base de données. $AuthOptions = array( 'dsn'=>"pgsql://test:test@localhost/testdb", -'table'=>"table_test", // Nom de votre table -'usernamecol'=>"username", // Nom de la colonne contenant le nom d'utilisateur -'passwordcol'=>"password", // Nom de la colonne contenant le mot de passe -'cryptType'=>"none", // Type de cryptage du mot de passe dans la BD +'table'=>"table_test", // Nom de votre table +'usernamecol'=>"username", // Nom de la colonne contenant le nom d'utilisateur +'passwordcol'=>"password", // Nom de la colonne contenant le mot de passe +'cryptType'=>"none", // Type de cryptage du mot de passe dans la BD ); - $a = new Auth_HTTP("DB", $AuthOptions); -$a->setRealm('votreRoyaume'); // nom du royaume (ensemble de l'espace protégé) -$a->setCancelText('<h2>Erreur 401</h2>'); // message d'erreur en cas d'echec -$a->start(); // démarrage de la procédure d'authentification. +$a->setRealm('votreRoyaume'); // Nom du royaume (ensemble de l'espace protégé) +$a->setCancelText('<h2>Erreur 401</h2>'); // Message d'erreur en cas d'echec +$a->start(); // Démarrage de la procédure d'authentification. -if($a->getAuth()) // Verification du résultat -{ - echo "Salut ".$a->username." bienvenue dans ma page protégée"; - +if($a->getAuth()) { // Verification du résultat + echo "Salut ".$a->username.", bienvenue dans ma page protégée"; }; ?> - - ]]> +]]> </programlisting> </refsect1> </refentry> + <!-- Keep this comment at the end of the file Local variables: mode: sgml @@ -63,4 +61,4 @@ vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 ---> +--> \ No newline at end of file http://cvs.php.net/viewvc.cgi/peardoc/fr/package/authentication/auth-http/auth-http/getauth.xml?r1=1.5&r2=1.6&diff_format=u Index: peardoc/fr/package/authentication/auth-http/auth-http/getauth.xml diff -u peardoc/fr/package/authentication/auth-http/auth-http/getauth.xml:1.5 peardoc/fr/package/authentication/auth-http/auth-http/getauth.xml:1.6 --- peardoc/fr/package/authentication/auth-http/auth-http/getauth.xml:1.5 Sat Dec 23 13:53:24 2006 +++ peardoc/fr/package/authentication/auth-http/auth-http/getauth.xml Sat Dec 23 14:28:01 2006 @@ -1,16 +1,17 @@ <?xml version="1.0" encoding="iso-8859-1" ?> +<!-- $Revision: 1.6 $ --> <!-- EN-Revision: 1.4 Maintainer: moosh Status: ready --> -<!-- $Revision $ --> + <refentry id="package.authentication.auth-http.auth-http.getauth"> <refnamediv> <refname>Auth_HTTP::getAuth()</refname> - <refpurpose>Vérifie si un utilisateur est authentifié</refpurpose> + <refpurpose>Vérifie si un utilisateur est identifié</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcprototype> <funcdef> - &type.bool; + &type.bool; <function>Auth_HTTP::getAuth</function> </funcdef> <paramdef></paramdef> @@ -20,23 +21,23 @@ <refsect1 id="package.authentication.auth-http.auth-http.getauth.desc"> &title.desc; <para> - Vérifie si un utilisateur est authentifié + Vérifie si un utilisateur est identifié. </para> - </refsect1> + </refsect1> <refsect1 id="package.authentication.auth-http.auth-http.getauth.return"> &title.returns; <para> - <parameter>booléen</parameter> - - Si l'utilisateur est déjà autentifié, - la fonction retourne &true;. + <parameter>booléen</parameter> + - Si l'utilisateur est déjà autentifié, la fonction retourne &true;. Sinon elle retourne &false;. </para> - </refsect1> + </refsect1> <refsect1 id="package.authentication.auth-http.auth-http.getauth.note"> &title.note; ¬e.notstatic; - </refsect1> + </refsect1> </refentry> + <!-- Keep this comment at the end of the file Local variables: mode: sgml @@ -55,4 +56,4 @@ vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 ---> +--> \ No newline at end of file http://cvs.php.net/viewvc.cgi/peardoc/fr/package/authentication/auth-http/auth-http/getstatus.xml?r1=1.4&r2=1.5&diff_format=u Index: peardoc/fr/package/authentication/auth-http/auth-http/getstatus.xml diff -u peardoc/fr/package/authentication/auth-http/auth-http/getstatus.xml:1.4 peardoc/fr/package/authentication/auth-http/auth-http/getstatus.xml:1.5 --- peardoc/fr/package/authentication/auth-http/auth-http/getstatus.xml:1.4 Sat Dec 23 13:53:24 2006 +++ peardoc/fr/package/authentication/auth-http/auth-http/getstatus.xml Sat Dec 23 14:28:01 2006 @@ -1,53 +1,50 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- EN-Revision: 1.3 Maintainer: moosh Status: start $Date: 2006/12/23 13:53:24 $ --> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> +<!-- EN-Revision: 1.3 Maintainer: moosh Status: ready --> + <refentry id="package.authentication.auth-http.auth-http.getstatus"> <refnamediv> <refname>Auth_HTTP::getStatus()</refname> - <refpurpose> - retourne des informations - sur le statut de l'autentification en cours - </refpurpose> + <refpurpose>Retourne des informations sur le statut de l'autentification en cours</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcprototype> <funcdef>&type.string; <function>Auth_HTTP::getStatus</function></funcdef> - <paramdef></paramdef> + <paramdef></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.authentication.auth-http.auth-http.getstatus.desc"> &title.desc; <para> - Cette fonction retourne le statut de PEAR::Auth. - + Cette fonction retourne le statut de PEAR::Auth. La valeur retournée est une constante définie par PEAR Auth. </para> - </refsect1> + </refsect1> <refsect1 id="package.authentication.auth-http.auth-http.getstatus.return"> &title.returns; <para> - <parameter>&type.string;</parameter> + <parameter>&type.string;</parameter> - les valeurs possibles sont - <constant>AUTH_IDLED</constant>, - <constant>AUTH_EXPIRED</constant>, - <constant>AUTH_EXPIRED</constant> + <constant>AUTH_IDLED</constant>, + <constant>AUTH_EXPIRED</constant> et + <constant>AUTH_EXPIRED</constant>. </para> - </refsect1> + </refsect1> <refsect1 id="package.authentication.auth-http.auth-http.getstatus.note"> &title.note; ¬e.notstatic; - - </refsect1> + </refsect1> <refsect1 id="package.authentication.auth-http.auth-http.getstatus.see"> &title.see; <para> <link linkend="package.authentication.auth.constants"> Aperçu des constantes PEAR Auth</link> </para> - </refsect1> + </refsect1> </refentry> + <!-- Keep this comment at the end of the file Local variables: mode: sgml @@ -66,4 +63,4 @@ vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 ---> +--> \ No newline at end of file http://cvs.php.net/viewvc.cgi/peardoc/fr/package/authentication/auth-http/auth-http/start.xml?r1=1.4&r2=1.5&diff_format=u Index: peardoc/fr/package/authentication/auth-http/auth-http/start.xml diff -u peardoc/fr/package/authentication/auth-http/auth-http/start.xml:1.4 peardoc/fr/package/authentication/auth-http/auth-http/start.xml:1.5 --- peardoc/fr/package/authentication/auth-http/auth-http/start.xml:1.4 Sat Dec 23 13:53:24 2006 +++ peardoc/fr/package/authentication/auth-http/auth-http/start.xml Sat Dec 23 14:28:01 2006 @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <!-- EN-Revision: 1.2 Maintainer: moosh Status: ready --> + <refentry id="package.authentication.auth-http.auth-http.start"> <refnamediv> <refname>Auth_HTTP::start()</refname> - <refpurpose>Démarre l'authentfication</refpurpose> + <refpurpose>Démarre l'identification</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> @@ -17,14 +18,15 @@ <refsect1 id="package.authentication.auth-http.auth-http.start.desc"> &title.desc; <para> - Initie la procédure d'autentification + Initie la procédure d'identification </para> - </refsect1> + </refsect1> <refsect1 id="package.authentication.auth-http.auth-http.start.note"> &title.note; ¬e.notstatic; - </refsect1> + </refsect1> </refentry> + <!-- Keep this comment at the end of the file Local variables: mode: sgml @@ -43,4 +45,4 @@ vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 ---> +--> \ No newline at end of file
http://cvs.php.net/viewvc.cgi/peardoc/fr/package/authentication/auth-http/auth-http/auth-http.xml?r1=1.3&r2=1.4&diff_format=u Index: peardoc/fr/package/authentication/auth-http/auth-http/auth-http.xml diff -u peardoc/fr/package/authentication/auth-http/auth-http/auth-http.xml:1.3 peardoc/fr/package/authentication/auth-http/auth-http/auth-http.xml:1.4 --- peardoc/fr/package/authentication/auth-http/auth-http/auth-http.xml:1.3 Sat Dec 23 13:53:24 2006 +++ peardoc/fr/package/authentication/auth-http/auth-http/auth-http.xml Sat Dec 23 14:28:01 2006 @@ -1,19 +1,20 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.3 $ --> -<!-- EN-Revision: 1.4 Maintainer: moosh Status: ready $Date: 2006/12/23 13:53:24 $ --> +<!-- $Revision: 1.4 $ --> +<!-- EN-Revision: 1.4 Maintainer: moosh Status: ready --> + <refentry id="package.authentication.auth-http.auth-http.auth-http.auth-http"> <refnamediv> <refname>Auth_HTTP::Auth_HTTP()</refname> - <refpurpose>constructor</refpurpose> + <refpurpose>Constructeur</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcprototype> - <funcdef>&type.void; <function>Auth_HTTP::Auth_HTTP</function></funcdef> - <paramdef>&type.string; + <funcdef>void <function>Auth_HTTP::Auth_HTTP</function></funcdef> + <paramdef>string <parameter><optional>$driverDeStockage = "DB"</optional></parameter> </paramdef> - <paramdef>&type.mixed; + <paramdef>mixed <parameter><optional>$options = ""</optional></parameter> </paramdef> </funcprototype> @@ -22,9 +23,9 @@ <refsect1 id="package.authentication.auth-http.auth-http.auth-http.auth-http.desc"> &title.desc; <para> - Constructeur pour le système d'authentification + Constructeur pour le système d'identification. </para> - </refsect1> + </refsect1> <refsect1 id="package.authentication.auth-http.auth-http.auth-http.auth-http.parameter"> &title.param; <para> @@ -36,11 +37,11 @@ </term> <listitem> <para> - nom du driver de stockage qui doit être utilisé + nom du driver de stockage qui doit être utilisé </para> - </listitem> + </listitem> </varlistentry> - <varlistentry> + <varlistentry> <term> &type.mixed; <parameter>$options</parameter> @@ -48,18 +49,18 @@ <listitem> <para> une chaîne contenant des information d'identification - ou un tableau contenant une série d'option - pour le driver de stockage - </para> - </listitem> + ou un tableau contenant une série d'option + pour le driver de stockage + </para> + </listitem> </varlistentry> - </variablelist> + </variablelist> </para> - </refsect1> + </refsect1> <refsect1 id="package.authentication.auth-http.auth-http.auth-http.auth-http.note"> &title.note; ¬e.notstatic; - </refsect1> + </refsect1> <refsect1 id="package.authentication.auth-http.auth-http.auth-http.auth-http.example"> &title.example; <example> @@ -70,12 +71,13 @@ $a = new Auth_HTTP("DB", "mysql://test:test@localhost/test"); -$a->start(); +$a->start(); ]]> </programlisting> </example> - </refsect1> + </refsect1> </refentry> + <!-- Keep this comment at the end of the file Local variables: mode: sgml @@ -94,4 +96,4 @@ vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 ---> +--> \ No newline at end of file http://cvs.php.net/viewvc.cgi/peardoc/fr/package/authentication/auth-http/auth-http/example2.xml?r1=1.6&r2=1.7&diff_format=u Index: peardoc/fr/package/authentication/auth-http/auth-http/example2.xml diff -u peardoc/fr/package/authentication/auth-http/auth-http/example2.xml:1.6 peardoc/fr/package/authentication/auth-http/auth-http/example2.xml:1.7 --- peardoc/fr/package/authentication/auth-http/auth-http/example2.xml:1.6 Sat Dec 23 13:53:24 2006 +++ peardoc/fr/package/authentication/auth-http/auth-http/example2.xml Sat Dec 23 14:28:01 2006 @@ -1,56 +1,55 @@ <?xml version="1.0" encoding="iso-8859-1" ?> <!-- EN-Revision: 1.5 Maintainer: moosh Status: ready --> -<!-- $Revision: 1.6 $ --> +<!-- $Revision: 1.7 $ --> <refentry id="package.authentication.auth-http.auth-http.example2"> <refnamediv> - <refname>Exemple 2 Auth_HTTP</refname> + <refname>Auth_HTTP : Exemple 2</refname> <refpurpose> - Exemple: - Une page protegée par mot de passe - avec plusieurs rang trouvé et un mot de passe md5 + Exemple: + Une page protegée par mot de passe avec plusieurs rang trouvé + et un mot de passe md5 </refpurpose> </refnamediv> <refsect1> &title.example; <programlisting role="php"> -<![CDATA[ -<?php -// exemple d'implémentation de Auth_HTTP avec mot de passe crypté (md5) +<![CDATA[ +<?php +// Exemple d'implémentation de Auth_HTTP avec mot de passe crypté (md5) // et une récupération de colonnes annexes. require_once("Auth/HTTP.php"); -// connexion à la base +// Connexion à la base $AuthOptions = array( 'dsn'=>"pgsql://test:test@localhost/testdb", -'table'=>"testable", // Nom de votre table -'usernamecol'=>"username", // Nom de la colonne contenant le nom d'utilisateur -'passwordcol'=>"password", // Nom de la colonne contenant le mot de passe -'cryptType'=>"md5", // Type de cryptage du mot de passe dans la BD -'db_fields'=>"*" // active la récupération des données des autres colonnes +'table'=>"testable", // Nom de votre table +'usernamecol'=>"username", // Nom de la colonne contenant le nom d'utilisateur +'passwordcol'=>"password", // Nom de la colonne contenant le mot de passe +'cryptType'=>"md5", // Type de cryptage du mot de passe dans la BD +'db_fields'=>"*" // Active la récupération des données des autres colonnes ); - $a = new Auth_HTTP("DB", $AuthOptions); -$a->setRealm('votreRoyaume'); // nom du royaume (ensemble de l'espace protégé) -$a->setCancelText('<h2>Erreur 401</h2>'); // message d'erreur en cas d'echec -$a->start(); // démarrage de la procédure d'authentification. +$a->setRealm('votreRoyaume'); // Nom du royaume (ensemble de l'espace protégé) +$a->setCancelText('<h2>Erreur 401</h2>'); // Message d'erreur en cas d'echec +$a->start(); // Démarrage de la procédure d'authentification. -if($a->getAuth()) // en cas de réussite -{ - echo "Salut ".$a->username." bienvenue dans ma page protégée"; - echo "Nos info sur vous: <BR>"; - echo $a->getAuthData('userid'); // On a retrouvé d'autres info dans la table - echo $a->getAuthData('telephone'); // Dans cet exemple, l'id user, son téléphone - echo $a->getAuthData('email'); // et son adresse email. +if($a->getAuth()) { // en cas de réussite + echo "Salut ".$a->username." bienvenue dans ma page protégée"; + echo "Nos info sur vous: <BR>"; + echo $a->getAuthData('userid'); // On a retrouvé d'autres info dans la table + echo $a->getAuthData('telephone'); // Dans cet exemple, l'id user, son téléphone + echo $a->getAuthData('email'); // et son adresse email. }; ?> - ]]> +]]> </programlisting> </refsect1> </refentry> + <!-- Keep this comment at the end of the file Local variables: mode: sgml @@ -69,4 +68,4 @@ vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 ---> +--> \ No newline at end of file http://cvs.php.net/viewvc.cgi/peardoc/fr/package/authentication/auth-http/auth-http/example.xml?r1=1.6&r2=1.7&diff_format=u Index: peardoc/fr/package/authentication/auth-http/auth-http/example.xml diff -u peardoc/fr/package/authentication/auth-http/auth-http/example.xml:1.6 peardoc/fr/package/authentication/auth-http/auth-http/example.xml:1.7 --- peardoc/fr/package/authentication/auth-http/auth-http/example.xml:1.6 Sat Dec 23 13:53:24 2006 +++ peardoc/fr/package/authentication/auth-http/auth-http/example.xml Sat Dec 23 14:28:01 2006 @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="iso-8859-1" ?> +<!-- $Revision: 1.7 $ --> <!-- EN-Revision: 1.3 Maintainer: moosh Status: ready --> -<!-- $Revision: 1.6 $ --> + <refentry id="package.authentication.auth-http.auth-http.example"> <refnamediv> <refname>Exemple Auth_HTTP</refname> @@ -12,39 +13,36 @@ <![CDATA[ <?php -// exemple of Auth_HTTP basic implementation +// Exemple d'implémentation de Auth_HTTP require_once("Auth/HTTP.php"); -// Options de connexion à la base de donnée. +// Options de connexion à la base de données. $AuthOptions = array( 'dsn'=>"pgsql://test:test@localhost/testdb", -'table'=>"table_test", // Nom de votre table -'usernamecol'=>"username", // Nom de la colonne contenant le nom d'utilisateur -'passwordcol'=>"password", // Nom de la colonne contenant le mot de passe -'cryptType'=>"none", // Type de cryptage du mot de passe dans la BD +'table'=>"table_test", // Nom de votre table +'usernamecol'=>"username", // Nom de la colonne contenant le nom d'utilisateur +'passwordcol'=>"password", // Nom de la colonne contenant le mot de passe +'cryptType'=>"none", // Type de cryptage du mot de passe dans la BD ); - $a = new Auth_HTTP("DB", $AuthOptions); -$a->setRealm('votreRoyaume'); // nom du royaume (ensemble de l'espace protégé) -$a->setCancelText('<h2>Erreur 401</h2>'); // message d'erreur en cas d'echec -$a->start(); // démarrage de la procédure d'authentification. +$a->setRealm('votreRoyaume'); // Nom du royaume (ensemble de l'espace protégé) +$a->setCancelText('<h2>Erreur 401</h2>'); // Message d'erreur en cas d'echec +$a->start(); // Démarrage de la procédure d'authentification. -if($a->getAuth()) // Verification du résultat -{ - echo "Salut ".$a->username." bienvenue dans ma page protégée"; - +if($a->getAuth()) { // Verification du résultat + echo "Salut ".$a->username.", bienvenue dans ma page protégée"; }; ?> - - ]]> +]]> </programlisting> </refsect1> </refentry> + <!-- Keep this comment at the end of the file Local variables: mode: sgml @@ -63,4 +61,4 @@ vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 ---> +--> \ No newline at end of file http://cvs.php.net/viewvc.cgi/peardoc/fr/package/authentication/auth-http/auth-http/getauth.xml?r1=1.5&r2=1.6&diff_format=u Index: peardoc/fr/package/authentication/auth-http/auth-http/getauth.xml diff -u peardoc/fr/package/authentication/auth-http/auth-http/getauth.xml:1.5 peardoc/fr/package/authentication/auth-http/auth-http/getauth.xml:1.6 --- peardoc/fr/package/authentication/auth-http/auth-http/getauth.xml:1.5 Sat Dec 23 13:53:24 2006 +++ peardoc/fr/package/authentication/auth-http/auth-http/getauth.xml Sat Dec 23 14:28:01 2006 @@ -1,16 +1,17 @@ <?xml version="1.0" encoding="iso-8859-1" ?> +<!-- $Revision: 1.6 $ --> <!-- EN-Revision: 1.4 Maintainer: moosh Status: ready --> -<!-- $Revision $ --> + <refentry id="package.authentication.auth-http.auth-http.getauth"> <refnamediv> <refname>Auth_HTTP::getAuth()</refname> - <refpurpose>Vérifie si un utilisateur est authentifié</refpurpose> + <refpurpose>Vérifie si un utilisateur est identifié</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcprototype> <funcdef> - &type.bool; + &type.bool; <function>Auth_HTTP::getAuth</function> </funcdef> <paramdef></paramdef> @@ -20,23 +21,23 @@ <refsect1 id="package.authentication.auth-http.auth-http.getauth.desc"> &title.desc; <para> - Vérifie si un utilisateur est authentifié + Vérifie si un utilisateur est identifié. </para> - </refsect1> + </refsect1> <refsect1 id="package.authentication.auth-http.auth-http.getauth.return"> &title.returns; <para> - <parameter>booléen</parameter> - - Si l'utilisateur est déjà autentifié, - la fonction retourne &true;. + <parameter>booléen</parameter> + - Si l'utilisateur est déjà autentifié, la fonction retourne &true;. Sinon elle retourne &false;. </para> - </refsect1> + </refsect1> <refsect1 id="package.authentication.auth-http.auth-http.getauth.note"> &title.note; ¬e.notstatic; - </refsect1> + </refsect1> </refentry> + <!-- Keep this comment at the end of the file Local variables: mode: sgml @@ -55,4 +56,4 @@ vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 ---> +--> \ No newline at end of file http://cvs.php.net/viewvc.cgi/peardoc/fr/package/authentication/auth-http/auth-http/getstatus.xml?r1=1.4&r2=1.5&diff_format=u Index: peardoc/fr/package/authentication/auth-http/auth-http/getstatus.xml diff -u peardoc/fr/package/authentication/auth-http/auth-http/getstatus.xml:1.4 peardoc/fr/package/authentication/auth-http/auth-http/getstatus.xml:1.5 --- peardoc/fr/package/authentication/auth-http/auth-http/getstatus.xml:1.4 Sat Dec 23 13:53:24 2006 +++ peardoc/fr/package/authentication/auth-http/auth-http/getstatus.xml Sat Dec 23 14:28:01 2006 @@ -1,53 +1,50 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- EN-Revision: 1.3 Maintainer: moosh Status: start $Date: 2006/12/23 13:53:24 $ --> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> +<!-- EN-Revision: 1.3 Maintainer: moosh Status: ready --> + <refentry id="package.authentication.auth-http.auth-http.getstatus"> <refnamediv> <refname>Auth_HTTP::getStatus()</refname> - <refpurpose> - retourne des informations - sur le statut de l'autentification en cours - </refpurpose> + <refpurpose>Retourne des informations sur le statut de l'autentification en cours</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcprototype> <funcdef>&type.string; <function>Auth_HTTP::getStatus</function></funcdef> - <paramdef></paramdef> + <paramdef></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.authentication.auth-http.auth-http.getstatus.desc"> &title.desc; <para> - Cette fonction retourne le statut de PEAR::Auth. - + Cette fonction retourne le statut de PEAR::Auth. La valeur retournée est une constante définie par PEAR Auth. </para> - </refsect1> + </refsect1> <refsect1 id="package.authentication.auth-http.auth-http.getstatus.return"> &title.returns; <para> - <parameter>&type.string;</parameter> + <parameter>&type.string;</parameter> - les valeurs possibles sont - <constant>AUTH_IDLED</constant>, - <constant>AUTH_EXPIRED</constant>, - <constant>AUTH_EXPIRED</constant> + <constant>AUTH_IDLED</constant>, + <constant>AUTH_EXPIRED</constant> et + <constant>AUTH_EXPIRED</constant>. </para> - </refsect1> + </refsect1> <refsect1 id="package.authentication.auth-http.auth-http.getstatus.note"> &title.note; ¬e.notstatic; - - </refsect1> + </refsect1> <refsect1 id="package.authentication.auth-http.auth-http.getstatus.see"> &title.see; <para> <link linkend="package.authentication.auth.constants"> Aperçu des constantes PEAR Auth</link> </para> - </refsect1> + </refsect1> </refentry> + <!-- Keep this comment at the end of the file Local variables: mode: sgml @@ -66,4 +63,4 @@ vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 ---> +--> \ No newline at end of file http://cvs.php.net/viewvc.cgi/peardoc/fr/package/authentication/auth-http/auth-http/start.xml?r1=1.4&r2=1.5&diff_format=u Index: peardoc/fr/package/authentication/auth-http/auth-http/start.xml diff -u peardoc/fr/package/authentication/auth-http/auth-http/start.xml:1.4 peardoc/fr/package/authentication/auth-http/auth-http/start.xml:1.5 --- peardoc/fr/package/authentication/auth-http/auth-http/start.xml:1.4 Sat Dec 23 13:53:24 2006 +++ peardoc/fr/package/authentication/auth-http/auth-http/start.xml Sat Dec 23 14:28:01 2006 @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <!-- EN-Revision: 1.2 Maintainer: moosh Status: ready --> + <refentry id="package.authentication.auth-http.auth-http.start"> <refnamediv> <refname>Auth_HTTP::start()</refname> - <refpurpose>Démarre l'authentfication</refpurpose> + <refpurpose>Démarre l'identification</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> @@ -17,14 +18,15 @@ <refsect1 id="package.authentication.auth-http.auth-http.start.desc"> &title.desc; <para> - Initie la procédure d'autentification + Initie la procédure d'identification </para> - </refsect1> + </refsect1> <refsect1 id="package.authentication.auth-http.auth-http.start.note"> &title.note; ¬e.notstatic; - </refsect1> + </refsect1> </refentry> + <!-- Keep this comment at the end of the file Local variables: mode: sgml @@ -43,4 +45,4 @@ vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 ---> +--> \ No newline at end of file