com.sshtools.j2ssh.authentication
Class SshMsgUserAuthPwdRequest

java.lang.Object
  |
  +--com.sshtools.j2ssh.transport.SshMessage
        |
        +--com.sshtools.j2ssh.authentication.SshMsgUserAuthRequest
              |
              +--com.sshtools.j2ssh.authentication.SshMsgUserAuthPwdRequest

public class SshMsgUserAuthPwdRequest
extends SshMsgUserAuthRequest

Implements the SSH_MSG_USERAUTH_REQUEST for the password authentication method

Version:
1.0
Author:
Lee David Painter ( lee@sshtools.com )

Field Summary
 
Fields inherited from class com.sshtools.j2ssh.authentication.SshMsgUserAuthRequest
SSH_MSG_USERAUTH_REQUEST
 
Constructor Summary
SshMsgUserAuthPwdRequest()
          Constructs the message
SshMsgUserAuthPwdRequest(java.lang.String username, java.lang.String password, java.lang.String serviceName)
          Constructors the message
 
Method Summary
protected  void constructByteArray(ByteArrayWriter baw)
           Constructs a byte array containing the message.
protected  void constructMessage(ByteArrayReader bar)
           Constructs the message from a byte array.
 java.lang.String getPassword()
           Gets the password.
 
Methods inherited from class com.sshtools.j2ssh.authentication.SshMsgUserAuthRequest
getMessageName, getMethodName, getServiceName, getUsername
 
Methods inherited from class com.sshtools.j2ssh.transport.SshMessage
fromByteArray, getMessageId, toByteArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SshMsgUserAuthPwdRequest

public SshMsgUserAuthPwdRequest(java.lang.String username,
                                java.lang.String password,
                                java.lang.String serviceName)
Constructors the message

Parameters:
username - The users name
password - The users password
serviceName - The service name to start

SshMsgUserAuthPwdRequest

public SshMsgUserAuthPwdRequest()
                         throws InvalidMessageException
Constructs the message

Throws:
InvalidMessageException
Method Detail

getPassword

public java.lang.String getPassword()

Gets the password.

Returns:
The password

constructMessage

protected void constructMessage(ByteArrayReader bar)
                         throws InvalidMessageException

Constructs the message from a byte array.

Overrides:
constructMessage in class SshMsgUserAuthRequest
Parameters:
bar - The byte array being read
Throws:
InvalidMessageException

constructByteArray

protected void constructByteArray(ByteArrayWriter baw)
                           throws InvalidMessageException

Constructs a byte array containing the message.

Overrides:
constructByteArray in class SshMsgUserAuthRequest
Parameters:
baw - The byte array being written
Throws:
InvalidMessageException


Copyright © 2002 Sshtools.com. All Rights Reserved.