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

Public Member Functions

 __construct (\fpoirotte\Pssht\KeyStore $store)
 
 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

 $store
 Store for the host keys.
 

Additional Inherited Members

- Public Attributes inherited from fpoirotte\Pssht\Authentication\AuthenticationInterface
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.
 

Detailed Description

Host based authentication.

Definition at line 19 of file HostBased.php.

Constructor & Destructor Documentation

fpoirotte\Pssht\Authentication\HostBased::__construct ( \fpoirotte\Pssht\KeyStore  $store)

Construct a new host based authentication handler.

Parameters
fpoirotte::Pssht::KeyStore$storeStore containing the host keys to authorize.

Definition at line 30 of file HostBased.php.

References fpoirotte\Pssht\Authentication\HostBased\$store.

Member Function Documentation

fpoirotte\Pssht\Authentication\HostBased::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.

Implements fpoirotte\Pssht\Authentication\AuthenticationInterface.

Definition at line 52 of file HostBased.php.

References fpoirotte\Pssht\Algorithms\factory(), and fpoirotte\Pssht\Messages\USERAUTH\REQUEST\Base\getMessageId().

fpoirotte\Pssht\Authentication\HostBased::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.

Implements fpoirotte\Pssht\Authentication\AuthenticationInterface.

Definition at line 40 of file HostBased.php.


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