pssht  latest
SSH server library written in PHP
AuthenticationInterface.php
1 <?php
2 
3 /*
4 * This file is part of pssht.
5 *
6 * (c) François Poirotte <clicky@erebot.net>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11 
13 
17 interface AuthenticationInterface extends \fpoirotte\Pssht\Algorithms\AlgorithmInterface
18 {
20  const CHECK_OK = 1;
21 
23  const CHECK_REJECT = 2;
24 
26  const CHECK_IGNORE = 3;
27 
28 
30  const AUTH_ACCEPT = 1;
31 
33  const AUTH_REJECT = 2;
34 
36  const AUTH_REMOVE = 3;
37 
38 
56  public function check(
57  \fpoirotte\Pssht\Messages\USERAUTH\REQUEST\Base $message,
58  \fpoirotte\Pssht\Transport $transport,
59  array &$context
60  );
61 
79  public function authenticate(
80  \fpoirotte\Pssht\Messages\USERAUTH\REQUEST\Base $message,
81  \fpoirotte\Pssht\Transport $transport,
82  array &$context
83  );
84 }
check(\fpoirotte\Pssht\Messages\USERAUTH\REQUEST\Base $message,\fpoirotte\Pssht\Transport $transport, array &$context)
const AUTH_REMOVE
The authentication failed and the method should be removed.
authenticate(\fpoirotte\Pssht\Messages\USERAUTH\REQUEST\Base $message,\fpoirotte\Pssht\Transport $transport, array &$context)
const AUTH_ACCEPT
The authentication was successful.