pssht  latest
SSH server library written in PHP
fpoirotte\Pssht\Authentication\AuthenticationInterface Interface Reference
+ Inheritance diagram for fpoirotte\Pssht\Authentication\AuthenticationInterface:

Public Member Functions

 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)
 

Public Attributes

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.
 

Additional Inherited Members

- Static Public Member Functions inherited from fpoirotte\Pssht\Algorithms\AlgorithmInterface
static getName ()
 Return the name of the algorithm.
 

Detailed Description

Interface for an authentication method.

Definition at line 17 of file AuthenticationInterface.php.

Member Function Documentation

fpoirotte\Pssht\Authentication\AuthenticationInterface::authenticate ( \fpoirotte\Pssht\Messages\USERAUTH\REQUEST\Base  $message,
\fpoirotte\Pssht\Transport  $transport,
array &  $context 
)

Handle an authentication request.

Parameters
fpoirotte::Pssht::Messages::USERAUTH::REQUEST::Base$messageAuthenticate request to handle.
fpoirotte::Pssht::Transport$transportTransport layer the message originated from.
array$contextContext for the SSH session.
Return values
opaqueEither AuthenticationInterface::AUTH_ACCEPT or AuthenticationInterface::AUTH_REJECT or AuthenticationInterface::AUTH_REMOVE.

Implemented in fpoirotte\Pssht\Authentication\PublicKey, fpoirotte\Pssht\Authentication\Password, fpoirotte\Pssht\Authentication\HostBased, and fpoirotte\Pssht\Authentication\None.

fpoirotte\Pssht\Authentication\AuthenticationInterface::check ( \fpoirotte\Pssht\Messages\USERAUTH\REQUEST\Base  $message,
\fpoirotte\Pssht\Transport  $transport,
array &  $context 
)

Check the contents of an authentication request.

Parameters
fpoirotte::Pssht::Messages::USERAUTH::REQUEST::Base$messageMessage to check.
fpoirotte::Pssht::Transport$transportTransport layer the message originated from.
array$contextContext for the SSH session.
Return values
opaqueEither AuthenticationInterface::CHECK_OK or AuthenticationInterface::CHECK_REJECT or AuthenticationInterface::CHECK_IGNORE.

Implemented in fpoirotte\Pssht\Authentication\Password, fpoirotte\Pssht\Authentication\HostBased, fpoirotte\Pssht\Authentication\PublicKey, and fpoirotte\Pssht\Authentication\None.


The documentation for this interface was generated from the following file: