com.sshtools.j2ssh.authentication
Class PasswordAuthentication

java.lang.Object
  |
  +--com.sshtools.j2ssh.authentication.PasswordAuthentication
All Implemented Interfaces:
SshAuthentication

public class PasswordAuthentication
extends java.lang.Object
implements SshAuthentication

Implements the Password Authentication for the SSH Authenticaiton Protocol

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

Constructor Summary
PasswordAuthentication()
          Constructs the PasswordAuthentication object
 
Method Summary
 void authenticate(TransportProtocol transport, java.lang.String serviceToStart)
           Sends the password authentication over the transport protocol.
 java.lang.String getMethodName()
           Returns the SSH User Authentication method name.
 void setPassword(java.lang.String password)
           Sets the password for the authentication.
 void setUsername(java.lang.String username)
           Sets the username for the authentication.
 boolean showAuthenticationDialog(java.awt.Frame parent)
           Displays a modal login prompt.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PasswordAuthentication

public PasswordAuthentication()
Constructs the PasswordAuthentication object

Method Detail

showAuthenticationDialog

public boolean showAuthenticationDialog(java.awt.Frame parent)

Displays a modal login prompt.

Specified by:
showAuthenticationDialog in interface SshAuthentication
Parameters:
parent - The parent frame
Returns:
True if the instance is ready to authenticate otherwise false

setUsername

public void setUsername(java.lang.String username)

Sets the username for the authentication.

Specified by:
setUsername in interface SshAuthentication
Parameters:
username - The username

setPassword

public void setPassword(java.lang.String password)

Sets the password for the authentication.

Parameters:
password - The user's password

getMethodName

public java.lang.String getMethodName()

Returns the SSH User Authentication method name.

Specified by:
getMethodName in interface SshAuthentication
Returns:
The method name

authenticate

public void authenticate(TransportProtocol transport,
                         java.lang.String serviceToStart)
                  throws TransportProtocolException,
                         AuthenticationProtocolException

Sends the password authentication over the transport protocol.

Specified by:
authenticate in interface SshAuthentication
Parameters:
transport - The connected transport protocol
serviceToStart - The service to start after an authentication success
Throws:
TransportProtocolException
AuthenticationProtocolException - Description of the Exception


Copyright © 2002 Sshtools.com. All Rights Reserved.