mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
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:
parent
637c733a67
commit
8cf9ac82e2
1 changed files with 26 additions and 5 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue