Detail and example for ssh2_auth_none()

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@175731 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Sara Golemon 2004-12-27 23:47:00 +00:00
parent 637c733a67
commit 8cf9ac82e2

View file

@ -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>