pollita Mon Dec 27 18:47:00 2004 EDT
Modified files: /phpdoc/en/reference/ssh2/functions ssh2-auth-none.xml Log: Detail and example for ssh2_auth_none() http://cvs.php.net/diff.php/phpdoc/en/reference/ssh2/functions/ssh2-auth-none.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc/en/reference/ssh2/functions/ssh2-auth-none.xml diff -u phpdoc/en/reference/ssh2/functions/ssh2-auth-none.xml:1.1 phpdoc/en/reference/ssh2/functions/ssh2-auth-none.xml:1.2 --- phpdoc/en/reference/ssh2/functions/ssh2-auth-none.xml:1.1 Fri Dec 24 20:03:17 2004 +++ phpdoc/en/reference/ssh2/functions/ssh2-auth-none.xml Mon Dec 27 18:47:00 2004 @@ -1,5 +1,5 @@ <?xml version='1.0' encoding='iso-8859-1'?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc. --> <refentry id="function.ssh2-auth-none"> <refnamediv> @@ -16,10 +16,31 @@ <methodparam><type>string</type><parameter>username</parameter></methodparam> </methodsynopsis> - <para> - Attempt "none" authentication, returns a list of allowed methods on failed authentication, - false on utter failure, or true on success - </para> + <simpara> + Attempt "none" authentication which usually will (and should) fail. + As part of this failure, servers will return a list of accepted + authentication methods. If the server does accept "none" as an + authentication method for <parameter>username</parameter>, this function + will simply return &true; + </simpara> + + <example> + <title>Using <function>ssh2_auth_none</function> to retreive + a list of authentication methods.</title> + <programlisting role="php"> +<![CDATA[ +<?php +$connection = ssh2_connect('shell.example.com', 22); + +$auth_methods = ssh2_auth_none($connection, 'user'); + +if (in_array('password', $auth_methods)) { + echo "Server supports password based authentication\n"; +} +?> +]]> + </programlisting> + </example> </refsect1> </refentry>