|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.maverick.sshd.auth.PublicKeyAuthentication
public class PublicKeyAuthentication
Provides an AuthenticationMechanism that enables the public key
authentication. The current implementation will look for an
authorized_keys file in the users home directory which is returned
from the
com.maverick.sshd.platform.NativeAuthenticationProvider#getHomeDirectory(String)
method. The format of this file is identical to that required by OpenSSH.
| Field Summary | |
|---|---|
static String |
AUTHENTICATION_METHOD
|
static int |
SSH_MSG_USERAUTH_PK_OK
|
| Constructor Summary | |
|---|---|
PublicKeyAuthentication(org.apache.mina.core.session.IoSession session,
SshTransport transport,
AuthenticationProtocol authentication,
Connection con,
PublicKeyAuthenticationProvider[] pkProviders)
|
|
| Method Summary | |
|---|---|
String |
getName()
Return the SSH method name for this authentication. |
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. |
| 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_PK_OK
public static final String AUTHENTICATION_METHOD
| Constructor Detail |
|---|
public PublicKeyAuthentication(org.apache.mina.core.session.IoSession session,
SshTransport transport,
AuthenticationProtocol authentication,
Connection con,
PublicKeyAuthenticationProvider[] pkProviders)
| Method Detail |
|---|
public String getName()
AuthenticationMechanism
getName in interface com.maverick.ssh.components.SshComponentgetName in interface AuthenticationMechanism
public 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 message
IOException
public boolean processMessage(byte[] msg)
throws IOException
AuthenticationMechanism
processMessage in interface AuthenticationMechanismIOExceptionpublic boolean isPassword()
AuthenticationMechanism
isPassword in interface AuthenticationMechanism
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||