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.
CANCELLED, COMPLETE, FAILED, FURTHER_AUTHENTICATION_REQUIRED, PUBLIC_KEY_ACCEPTABLE
|Modifier and Type||Method and Description|
Perform the authentication according to the specification.
getMethod, getUsername, setUsername
void authenticate(AuthenticationProtocol authentication, String servicename) throws SshException, AuthenticationResult
Copyright © 2023. All rights reserved.