pssht  latest
SSH server library written in PHP
fpoirotte\Pssht\Messages\USERAUTH\REQUEST\PublicKey Class Reference
+ Inheritance diagram for fpoirotte\Pssht\Messages\USERAUTH\REQUEST\PublicKey:

Public Member Functions

 __construct ($user, $service, $method, $algorithm, $key, $signature=null)
 
 getAlgorithm ()
 
 getKey ()
 
 getSignature ()
 
 serialize (\fpoirotte\Pssht\Wire\Encoder $encoder)
 
- Public Member Functions inherited from fpoirotte\Pssht\Messages\USERAUTH\REQUEST\Base
 __construct ($user, $service, $method)
 
 getMethodName ()
 
 getServiceName ()
 
 getUserName ()
 
 serialize (\fpoirotte\Pssht\Wire\Encoder $encoder)
 

Static Protected Member Functions

static unserializeSub (\fpoirotte\Pssht\Wire\Decoder $decoder)
 
- Static Protected Member Functions inherited from fpoirotte\Pssht\Messages\USERAUTH\REQUEST\Base
static unserializeSub (\fpoirotte\Pssht\Wire\Decoder $decoder)
 

Protected Attributes

 $algorithm
 Public key algorithm in use (eg. "ssh-rsa" or "ssh-dss").
 
 $key
 Key blob.
 
 $signature
 Signature to prove key ownership.
 
- Protected Attributes inherited from fpoirotte\Pssht\Messages\USERAUTH\REQUEST\Base
 $method
 Authentication method.
 
 $service
 Service to start after authentication.
 
 $user
 User being authenticated.
 

Additional Inherited Members

- Static Public Member Functions inherited from fpoirotte\Pssht\Messages\USERAUTH\REQUEST\Base
static getMessageId ()
 
static unserialize (\fpoirotte\Pssht\Wire\Decoder $decoder)
 

Detailed Description

SSH_MSG_USERAUTH_REQUEST message (RFC 4252) for the "publickey" method.

Definition at line 18 of file PublicKey.php.

Constructor & Destructor Documentation

fpoirotte\Pssht\Messages\USERAUTH\REQUEST\PublicKey::__construct (   $user,
  $service,
  $method,
  $algorithm,
  $key,
  $signature = null 
)

Construct a new user authentication request.

Parameters
string$userUser to authenticate as.
string$serviceService to run after authentication.
string$methodAuthentication method to use.
string$algorithmPublic key algorithm to use.
string$keyKey blob.
string$signature(optional) Signature proving ownership of the key. This parameter MUST be omitted during the first phase of authentication and MUST be given during the second phase.

Definition at line 45 of file PublicKey.php.

References fpoirotte\Pssht\Messages\USERAUTH\REQUEST\PublicKey\$algorithm, fpoirotte\Pssht\Messages\USERAUTH\REQUEST\PublicKey\$key, fpoirotte\Pssht\Messages\USERAUTH\REQUEST\Base\$method, fpoirotte\Pssht\Messages\USERAUTH\REQUEST\Base\$service, fpoirotte\Pssht\Messages\USERAUTH\REQUEST\PublicKey\$signature, and fpoirotte\Pssht\Messages\USERAUTH\REQUEST\Base\$user.

Member Function Documentation

fpoirotte\Pssht\Messages\USERAUTH\REQUEST\PublicKey::getAlgorithm ( )

Get the public key algorithm in use.

Return values
stringPublic key algorithm in use.

Definition at line 107 of file PublicKey.php.

References fpoirotte\Pssht\Messages\USERAUTH\REQUEST\PublicKey\$algorithm.

fpoirotte\Pssht\Messages\USERAUTH\REQUEST\PublicKey::getKey ( )

Get the key blob.

Return values
stringKey blob.

Definition at line 118 of file PublicKey.php.

References fpoirotte\Pssht\Messages\USERAUTH\REQUEST\PublicKey\$key.

fpoirotte\Pssht\Messages\USERAUTH\REQUEST\PublicKey::getSignature ( )

Get the signature proving key ownership.

Return values
stringSignature proving key ownership.
nullNo signature data was available.
Note
The SSH protocol uses a two-steps method for public key authentication. The signature will be null during the first step.

Definition at line 137 of file PublicKey.php.

References fpoirotte\Pssht\Messages\USERAUTH\REQUEST\PublicKey\$signature.

fpoirotte\Pssht\Messages\USERAUTH\REQUEST\PublicKey::serialize ( \fpoirotte\Pssht\Wire\Encoder  $encoder)

Serialize the message.

Parameters
fpoirotte::Pssht::Wire::Encoder$encoderEncoder to use to perform serialization.
Return values
MessageInterfaceReturns this message.

Implements fpoirotte\Pssht\Messages\MessageInterface.

Definition at line 65 of file PublicKey.php.

References fpoirotte\Pssht\Messages\USERAUTH\REQUEST\PublicKey\$algorithm, and fpoirotte\Pssht\Messages\USERAUTH\REQUEST\PublicKey\$signature.


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