pssht
latest
SSH server library written in PHP
|
Public Member Functions | |
__construct (array $credentials) | |
authenticate (\fpoirotte\Pssht\Messages\USERAUTH\REQUEST\Base $message,\fpoirotte\Pssht\Transport $transport, array &$context) | |
check (\fpoirotte\Pssht\Messages\USERAUTH\REQUEST\Base $message,\fpoirotte\Pssht\Transport $transport, array &$context) | |
Static Public Member Functions | |
static | getName () |
Return the name of the algorithm. | |
Protected Attributes | |
$credentials | |
Credentials of allowed users. | |
Additional Inherited Members | |
![]() | |
const | AUTH_ACCEPT = 1 |
The authentication was successful. | |
const | AUTH_REJECT = 2 |
The authentication failed. | |
const | AUTH_REMOVE = 3 |
The authentication failed and the method should be removed. | |
const | CHECK_IGNORE = 3 |
The message should be ignored. | |
const | CHECK_OK = 1 |
The message passed the check. | |
const | CHECK_REJECT = 2 |
The message should be rejected. | |
Password authentication.
Definition at line 19 of file Password.php.
fpoirotte\Pssht\Authentication\Password::__construct | ( | array | $credentials | ) |
Construct a new password authentication handler.
array | $credentials | Array with allowed users as keys and their respective passwords as values. |
Definition at line 31 of file Password.php.
References fpoirotte\Pssht\Authentication\Password\$credentials.
fpoirotte\Pssht\Authentication\Password::authenticate | ( | \fpoirotte\Pssht\Messages\USERAUTH\REQUEST\Base | $message, |
\fpoirotte\Pssht\Transport | $transport, | ||
array & | $context | ||
) |
Handle an authentication request.
fpoirotte::Pssht::Messages::USERAUTH::REQUEST::Base | $message | Authenticate request to handle. |
fpoirotte::Pssht::Transport | $transport | Transport layer the message originated from. |
array | $context | Context for the SSH session. |
opaque | Either AuthenticationInterface::AUTH_ACCEPT or AuthenticationInterface::AUTH_REJECT or AuthenticationInterface::AUTH_REMOVE. |
Implements fpoirotte\Pssht\Authentication\AuthenticationInterface.
Definition at line 53 of file Password.php.
fpoirotte\Pssht\Authentication\Password::check | ( | \fpoirotte\Pssht\Messages\USERAUTH\REQUEST\Base | $message, |
\fpoirotte\Pssht\Transport | $transport, | ||
array & | $context | ||
) |
Check the contents of an authentication request.
fpoirotte::Pssht::Messages::USERAUTH::REQUEST::Base | $message | Message to check. |
fpoirotte::Pssht::Transport | $transport | Transport layer the message originated from. |
array | $context | Context for the SSH session. |
opaque | Either AuthenticationInterface::CHECK_OK or AuthenticationInterface::CHECK_REJECT or AuthenticationInterface::CHECK_IGNORE. |
Implements fpoirotte\Pssht\Authentication\AuthenticationInterface.
Definition at line 41 of file Password.php.