com.sshtools.j2ssh.authentication
Interface SshAuthentication

All Known Implementing Classes:
PasswordAuthentication

public interface SshAuthentication

Interface for an SSH Authentication

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

Method Summary
 void authenticate(TransportProtocol transport, java.lang.String serviceToStart)
           The main authentication method; an implementation should authenticate by using the messages detailed in the method specification.
 java.lang.String getMethodName()
           Gets the authentication method name.
 void setUsername(java.lang.String username)
           Sets the username for the authentication; this is called by the framework to provide the authentication method with the username from the connection properties.
 boolean showAuthenticationDialog(java.awt.Frame parent)
           An implementation should display a modal dialog so that the user can enter method specific information; this is only called on GUI implementations.
 

Method Detail

authenticate

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

The main authentication method; an implementation should authenticate by using the messages detailed in the method specification. The authentication protocol handles the success or failure.

Parameters:
transport - The transport protocol to send through
serviceToStart - The Service to start after authentication
Throws:
AuthenticationProtocolException
TransportProtocolException - Description of the Exception

showAuthenticationDialog

public boolean showAuthenticationDialog(java.awt.Frame parent)

An implementation should display a modal dialog so that the user can enter method specific information; this is only called on GUI implementations.

Parameters:
parent - The parent frame
Returns:
Returns true if authentication is ready

getMethodName

public java.lang.String getMethodName()

Gets the authentication method name.

Returns:
The method name

setUsername

public void setUsername(java.lang.String username)

Sets the username for the authentication; this is called by the framework to provide the authentication method with the username from the connection properties. It is possible for the user to specify a different username so an implementation should use this to default only.

Parameters:
username - The user's name


Copyright © 2002 Sshtools.com. All Rights Reserved.