com.maverick.sshd
Class GSSAPIWithMICAuthentication

java.lang.Object
  extended by com.maverick.sshd.GSSAPIWithMICAuthentication
All Implemented Interfaces:
AuthenticationMechanism

public class GSSAPIWithMICAuthentication
extends java.lang.Object
implements AuthenticationMechanism


Constructor Summary
GSSAPIWithMICAuthentication()
           
 
Method Summary
protected  javax.security.auth.login.Configuration createDefaultConfiguration(SshContext context)
          Create the default JAAS Configuration.
 java.lang.String getMethod()
          Return the SSH method name for this authentication.
protected  java.lang.String getServicePrinicipal(SshContext context)
           
 void init(TransportProtocol transport, AuthenticationProtocol authentication, byte[] sessionId)
          Initializes the mechanism with variables.
 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(java.lang.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
 

Constructor Detail

GSSAPIWithMICAuthentication

public GSSAPIWithMICAuthentication()
Method Detail

getMethod

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

Specified by:
getMethod in interface AuthenticationMechanism
Returns:
String

init

public void init(TransportProtocol transport,
                 AuthenticationProtocol authentication,
                 byte[] sessionId)
          throws java.io.IOException
Description copied from interface: AuthenticationMechanism
Initializes the mechanism with variables.

Specified by:
init in interface AuthenticationMechanism
Parameters:
transport - the transport protocol
authentication - the authentication protocol
sessionId - the id of the current session.
Throws:
java.io.IOException

createDefaultConfiguration

protected javax.security.auth.login.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 java.lang.String getServicePrinicipal(SshContext context)

startRequest

public boolean startRequest(java.lang.String username,
                            byte[] msg)
                     throws java.io.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:
java.io.IOException

processMessage

public boolean processMessage(byte[] msg)
                       throws java.io.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:
java.io.IOException


Copyright © 2003-2008 SSHTools LTD. All Rights Reserved.