public class KeyboardInteractiveAuthentication extends Object implements AuthenticationMechanism
Modifier and Type | Field and Description |
---|---|
static String |
AUTHENTICATION_METHOD |
static int |
SSH_MSG_USERAUTH_INFO_REQUEST |
static int |
SSH_MSG_USERAUTH_INFO_RESPONSE |
Constructor and Description |
---|
KeyboardInteractiveAuthentication() |
KeyboardInteractiveAuthentication(TransportProtocol transport,
AuthenticationProtocol authentication,
Connection con,
KeyboardInteractiveAuthenticationProvider[] providers) |
Modifier and Type | Method and Description |
---|---|
String |
getMethod()
Return the SSH method name for this authentication.
|
TransportProtocol |
getTransport() |
boolean |
processMessage(byte[] msg)
If the SSH protocol authentication method defines additional messages
which are sent from the client, they will be passed into your
implementation here when received.
|
boolean |
startRequest(String username,
byte[] msg)
Start an authentication transaction.
|
public static final int SSH_MSG_USERAUTH_INFO_REQUEST
public static final int SSH_MSG_USERAUTH_INFO_RESPONSE
public static final String AUTHENTICATION_METHOD
public KeyboardInteractiveAuthentication()
public KeyboardInteractiveAuthentication(TransportProtocol transport, AuthenticationProtocol authentication, Connection con, KeyboardInteractiveAuthenticationProvider[] providers)
public String getMethod()
AuthenticationMechanism
getMethod
in interface AuthenticationMechanism
public TransportProtocol getTransport()
public boolean processMessage(byte[] msg) throws IOException
AuthenticationMechanism
processMessage
in interface AuthenticationMechanism
IOException
public boolean startRequest(String username, byte[] msg) throws IOException
AuthenticationMechanism
AuthenticationProtocol
instance that was passed
in the initialization process. The request data varies according to the
authentication method. if (success) authentication.completedAuthentication(method, username, service); else authentication.failedAuthentication(method);
startRequest
in interface AuthenticationMechanism
msg
- the request data from the SSH_MSG_USERAUTH_REQUEST messageIOException
Copyright © 2024. All rights reserved.