com.maverick.ssh2
Interface AuthenticationClient
- All Superinterfaces:
- SshAuthentication
- All Known Implementing Classes:
- KBIAuthentication, Ssh2HostbasedAuthentication, Ssh2PasswordAuthentication, Ssh2PublicKeyAuthentication
- public interface AuthenticationClient
- extends SshAuthentication
Base interface for all SSH authentication mechanisms. Each authentication
mechanism must conform to this interface which is called by the
AuthenticationProtocol after the
user invokes the authenticate method. Using the methods of the
AuthenticationProtocol the
implementation must read and send messages are required by the authentication
specification. When the server return's either a SSH_MSG_USERAUTH_SUCCESS
or SSH_MSG_USERAUTH_FAILURE the readMessage method will throw
AuthenticationResult and return
back to the AuthenticationProtocol.
This throwable class can also be thrown by the implementor from within
the mechanisms implementation, for instance if the user cancelled the
authentication.
- Author:
- Lee David Painter
authenticate
public void authenticate(AuthenticationProtocol authentication,
java.lang.String servicename)
throws SshException,
AuthenticationResult
- Perform the authentication according to the specification. The expected
result of this method is for the caller to catch an
AuthenticationResult. If the
method returns without throwing this then the caller will attempt to
read the next message available expecting it to be either a
SSH_MSG_USERAUTH_SUCCESS or SSH_MSG_USERAUTH_FAILURE.
- Parameters:
authentication - servicename -
- Throws:
java.io.IOException
AuthenticationResult
SshException
Copyright © 2003-2008 SSHTools LTD. All Rights Reserved.