public class KeyboardInteractiveAuthentication extends Object implements AuthenticationMechanism
| Modifier and Type | Field and Description |
|---|---|
static String |
AUTHENTICATION_METHOD |
protected Connection |
con |
static int |
SSH_MSG_USERAUTH_INFO_REQUEST |
static int |
SSH_MSG_USERAUTH_INFO_RESPONSE |
| Constructor and Description |
|---|
KeyboardInteractiveAuthentication(org.apache.mina.core.session.IoSession session,
SshTransport transport,
AuthenticationProtocol authentication,
Connection con,
KeyboardInteractiveProvider kbi) |
| Modifier and Type | Method and Description |
|---|---|
String |
getName()
Return the SSH method name for this authentication.
|
org.apache.mina.core.session.IoSession |
getSession() |
SshTransport |
getTransport() |
boolean |
isPassword()
Is this password authentication? We use this so user does not end up having to submit their
password if an alternative method provides password authentication but is not the core "password"
method (for example keyboard-interactive).
|
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
protected Connection con
public KeyboardInteractiveAuthentication(org.apache.mina.core.session.IoSession session,
SshTransport transport,
AuthenticationProtocol authentication,
Connection con,
KeyboardInteractiveProvider kbi)
public String getName()
AuthenticationMechanismgetName in interface com.maverick.ssh.components.SshComponentgetName in interface AuthenticationMechanismpublic SshTransport getTransport()
public boolean processMessage(byte[] msg)
throws IOException
AuthenticationMechanismprocessMessage in interface AuthenticationMechanismIOExceptionpublic boolean startRequest(String username, byte[] msg) throws IOException
AuthenticationMechanismAuthenticationProtocol
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 AuthenticationMechanismmsg - the request data from the SSH_MSG_USERAUTH_REQUEST messageIOExceptionpublic org.apache.mina.core.session.IoSession getSession()
public boolean isPassword()
AuthenticationMechanismisPassword in interface AuthenticationMechanismCopyright © 2012. All Rights Reserved.