Top Description Inners Fields Constructors Methods
org.eclipse.jgit.internal.transport.sshd

public Class GssApiWithMicAuthentication

extends AbstractUserAuth
Class Inheritance
Static Imports
java.text.MessageFormat.format

GSSAPI-with-MIC authentication handler (Kerberos 5).
See Also
RFC 4462

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static enum

Field Summary

Modifier and TypeField and Description
private GSSContext
private Oid
private Collection<Oid>
private Iterator<Oid>
private static final byte
SSH_MSG_USERAUTH_GSSAPI_RESPONSE

Synonym used in RFC 4462.

private static final byte
SSH_MSG_USERAUTH_GSSAPI_TOKEN

Synonym used in RFC 4462.

private GssApiWithMicAuthentication.ProtocolState

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
close(boolean silent)

public void
destroy()

Overrides org.apache.sshd.client.auth.AbstractUserAuth.destroy.

Implements org.apache.sshd.client.auth.UserAuth.destroy.

Called to release any allocated resources

private String
protected boolean
private void
replyToken(ClientSession session, String service, byte[] bytes)

protected boolean
private void
sendMic(ClientSession session, String service)

private void
sendToken(ClientSession session, byte[] receivedToken)

public void
signalAuthMethodFailure(ClientSession session, String
The requesting service name
service
,
boolean
true if some partial authentication success so far
partial
,
List<String>
The List of authentication methods that can continue
serverMethods
,
Buffer
The Buffer containing the failure message (after having consumed the relevant data from it)
buffer
)

Overrides default org.apache.sshd.client.auth.UserAuth.signalAuthMethodFailure.

Signals reception of SSH_MSG_USERAUTH_FAILURE message

public void
signalAuthMethodSuccess(ClientSession session, String
The requesting service name
service
,
Buffer
The Buffer containing the success message (after having consumed the relevant data from it)
buffer
)

Overrides default org.apache.sshd.client.auth.UserAuth.signalAuthMethodSuccess.

Signal reception of SSH_MSG_USERAUTH_SUCCESS message

private boolean
unexpectedMessage(int command)

Inherited from org.apache.sshd.client.auth.AbstractUserAuth:
getClientSessiongetNamegetServicegetSessioninitisCancellableprocesssetCancellabletoString

Field Detail

contextback to summary
private GSSContext context
currentMechanismback to summary
private Oid currentMechanism
mechanismsback to summary
private Collection<Oid> mechanisms
nextMechanismback to summary
private Iterator<Oid> nextMechanism
SSH_MSG_USERAUTH_GSSAPI_RESPONSEback to summary
private static final byte SSH_MSG_USERAUTH_GSSAPI_RESPONSE

Synonym used in RFC 4462.

SSH_MSG_USERAUTH_GSSAPI_TOKENback to summary
private static final byte SSH_MSG_USERAUTH_GSSAPI_TOKEN

Synonym used in RFC 4462.

stateback to summary
private GssApiWithMicAuthentication.ProtocolState state

Constructor Detail

GssApiWithMicAuthenticationback to summary
public GssApiWithMicAuthentication()

Creates a new GssApiWithMicAuthentication.

Method Detail

closeback to summary
private void close(boolean silent)
destroyback to summary
public void destroy()

Overrides org.apache.sshd.client.auth.AbstractUserAuth.destroy.

Implements org.apache.sshd.client.auth.UserAuth.destroy.

Doc from org.apache.sshd.client.auth.UserAuth.destroy.

Called to release any allocated resources

Annotations
@Override
getHostNameback to summary
private String getHostName(ClientSession session)
processAuthDataRequestback to summary
protected boolean processAuthDataRequest(ClientSession session, String service, Buffer in) throws Exception

Implements abstract org.apache.sshd.client.auth.AbstractUserAuth.processAuthDataRequest.

Annotations
@Override
replyTokenback to summary
private void replyToken(ClientSession session, String service, byte[] bytes) throws IOException, GSSException
sendAuthDataRequestback to summary
protected boolean sendAuthDataRequest(ClientSession session, String service) throws Exception

Implements abstract org.apache.sshd.client.auth.AbstractUserAuth.sendAuthDataRequest.

Annotations
@Override
sendMicback to summary
private void sendMic(ClientSession session, String service) throws IOException, GSSException
sendTokenback to summary
private void sendToken(ClientSession session, byte[] receivedToken) throws IOException, GSSException
signalAuthMethodFailureback to summary
public void signalAuthMethodFailure(ClientSession session, String service, boolean partial, List<String> serverMethods, Buffer buffer) throws Exception

Overrides default org.apache.sshd.client.auth.UserAuth.signalAuthMethodFailure.

Doc from org.apache.sshd.client.auth.UserAuth.signalAuthMethodFailure.

Signals reception of SSH_MSG_USERAUTH_FAILURE message

Parameters
session:ClientSession

The ClientSession

service:String

The requesting service name

partial:boolean

true if some partial authentication success so far

serverMethods:List<String>

The List of authentication methods that can continue

buffer:Buffer

The Buffer containing the failure message (after having consumed the relevant data from it)

Annotations
@Override
Exceptions
Exception:
If failed to handle the callback - Note: may cause session close
signalAuthMethodSuccessback to summary
public void signalAuthMethodSuccess(ClientSession session, String service, Buffer buffer) throws Exception

Overrides default org.apache.sshd.client.auth.UserAuth.signalAuthMethodSuccess.

Doc from org.apache.sshd.client.auth.UserAuth.signalAuthMethodSuccess.

Signal reception of SSH_MSG_USERAUTH_SUCCESS message

Parameters
session:ClientSession

The ClientSession

service:String

The requesting service name

buffer:Buffer

The Buffer containing the success message (after having consumed the relevant data from it)

Annotations
@Override
Exceptions
Exception:
If failed to handle the callback - Note: may cause session close
unexpectedMessageback to summary
private boolean unexpectedMessage(int command)
org.eclipse.jgit.internal.transport.sshd back to summary

private final Enum GssApiWithMicAuthentication.ProtocolState

extends Enum<GssApiWithMicAuthentication.ProtocolState>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final GssApiWithMicAuthentication.ProtocolState
public static final GssApiWithMicAuthentication.ProtocolState
public static final GssApiWithMicAuthentication.ProtocolState
public static final GssApiWithMicAuthentication.ProtocolState

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static GssApiWithMicAuthentication.ProtocolState
public static GssApiWithMicAuthentication.ProtocolState[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

FAILEDback to summary
public static final GssApiWithMicAuthentication.ProtocolState FAILED
MIC_SENTback to summary
public static final GssApiWithMicAuthentication.ProtocolState MIC_SENT
STARTEDback to summary
public static final GssApiWithMicAuthentication.ProtocolState STARTED
TOKENSback to summary
public static final GssApiWithMicAuthentication.ProtocolState TOKENS

Constructor Detail

ProtocolStateback to summary
private ProtocolState()

Method Detail

valueOfback to summary
public static GssApiWithMicAuthentication.ProtocolState valueOf(String name)
valuesback to summary
public static GssApiWithMicAuthentication.ProtocolState[] values()