|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.maverick.sshd.AuthenticationProtocol
public class AuthenticationProtocol
This class implements the SSH Authentication Protocol. The only required
interaction with this class would be if you were creating an
AuthenticationMechanism. In this scenario you would simply
call either completedAuthentication() or failedAuthentication()
to inform the protocol that your authentication either completed or failed.
| Field Summary | |
|---|---|
static int |
SSH_MSG_USERAUTH_BANNER
|
static int |
SSH_MSG_USERAUTH_FAILURE
|
static int |
SSH_MSG_USERAUTH_REQUEST
|
static int |
SSH_MSG_USERAUTH_SUCCESS
|
| Constructor Summary | |
|---|---|
AuthenticationProtocol()
|
|
| Method Summary | |
|---|---|
void |
completedAuthentication()
Each successful completion of an authentication method should call this method. |
void |
discardAuthentication()
Inform the protocol that the current authentication should be discarded. |
void |
failedAuthentication()
A failed authentication attempt should call this method. |
void |
failedAuthentication(boolean partial,
boolean ignoreFailed)
Called by the completeAuthentication method if a partial authentication success occurred. |
java.lang.Object |
getParameter(java.lang.String name)
|
void |
init(TransportProtocol transport)
Construct the protocol using the given transport |
boolean |
processMessage(byte[] msg)
Process an SSH message. |
void |
setParameter(java.lang.String name,
java.lang.Object value)
|
void |
start()
Called by the TransportProtocol when the service starts. |
void |
stop()
Called by the TransportProtocol when the service stops. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int SSH_MSG_USERAUTH_REQUEST
public static final int SSH_MSG_USERAUTH_FAILURE
public static final int SSH_MSG_USERAUTH_SUCCESS
public static final int SSH_MSG_USERAUTH_BANNER
| Constructor Detail |
|---|
public AuthenticationProtocol()
| Method Detail |
|---|
public void init(TransportProtocol transport)
transport -
java.io.IOExceptionpublic void stop()
TransportProtocol when the service stops.
public void start()
TransportProtocol when the service starts.
Here we check for an authentication banner and send if configured.
public boolean processMessage(byte[] msg)
throws java.io.IOException
msg - the message to process
java.io.IOExceptionpublic java.lang.Object getParameter(java.lang.String name)
public void setParameter(java.lang.String name,
java.lang.Object value)
public void completedAuthentication()
throws java.io.IOException
java.io.IOExceptionpublic void discardAuthentication()
public void failedAuthentication()
throws java.io.IOException
java.io.IOException
public void failedAuthentication(boolean partial,
boolean ignoreFailed)
throws java.io.IOException
partial - the authentication succeeded but another authentication is requiredignoreFailed - don't count this as a failed authentication
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||