com.maverick.sshd.auth
Class GSSAPIWithMICAuthentication

java.lang.Object
  extended by com.maverick.sshd.auth.GSSAPIWithMICAuthentication
All Implemented Interfaces:
com.maverick.ssh.components.SshComponent, AuthenticationMechanism

public class GSSAPIWithMICAuthentication
extends Object
implements AuthenticationMechanism


Field Summary
static String AUTHENTICATION_METHOD
           
 
Constructor Summary
GSSAPIWithMICAuthentication(org.apache.mina.core.session.IoSession session, SshTransport transport, AuthenticationProtocol authentication)
           
GSSAPIWithMICAuthentication(SshContext context)
           
 
Method Summary
protected  Configuration createDefaultConfiguration(SshContext context)
          Create the default JAAS Configuration.
 String getName()
          Return the SSH method name for this authentication.
protected  String getServicePrinicipal(SshContext context)
           
 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

AUTHENTICATION_METHOD

public static final String AUTHENTICATION_METHOD
See Also:
Constant Field Values
Constructor Detail

GSSAPIWithMICAuthentication

public GSSAPIWithMICAuthentication(org.apache.mina.core.session.IoSession session,
                                   SshTransport transport,
                                   AuthenticationProtocol authentication)
                            throws IOException
Throws:
IOException

GSSAPIWithMICAuthentication

public GSSAPIWithMICAuthentication(SshContext context)
                            throws IOException
Throws:
IOException
Method Detail

getName

public String getName()
Description copied from interface: AuthenticationMechanism
Return the SSH method name for this authentication. e.g "password"

Specified by:
getName in interface com.maverick.ssh.components.SshComponent
Specified by:
getName in interface AuthenticationMechanism
Returns:
String

createDefaultConfiguration

protected Configuration createDefaultConfiguration(SshContext context)
Create the default JAAS Configuration. Sub-classes may override instead of using the configuration supplied by SshContext.

Parameters:
context - context
Returns:
JAAS configuration

getServicePrinicipal

protected String getServicePrinicipal(SshContext context)

startRequest

public boolean startRequest(String username,
                            byte[] msg)
                     throws IOException
Description copied from interface: AuthenticationMechanism
Start an authentication transaction. If the authentication mechanism is simple and you can determine the result from all information received in the SSH_MSG_USERAUTH_REQUEST message, you should call the approriate completion methods on the 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);
 

Specified by:
startRequest in interface AuthenticationMechanism
msg - the request data from the SSH_MSG_USERAUTH_REQUEST message
Returns:
true if the message was processed, otherwise false
Throws:
IOException

processMessage

public boolean processMessage(byte[] msg)
                       throws IOException
Description copied from interface: AuthenticationMechanism
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.

Specified by:
processMessage in interface AuthenticationMechanism
Returns:
boolean
Throws:
IOException

isPassword

public boolean isPassword()
Description copied from interface: AuthenticationMechanism
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).

Specified by:
isPassword in interface AuthenticationMechanism
Returns:


Copyright © 2012. All Rights Reserved.