Class GssApiWithMicAuthentication
- java.lang.Object
-
- org.apache.sshd.common.util.logging.AbstractLoggingBean
-
- org.apache.sshd.client.auth.AbstractUserAuth
-
- org.eclipse.jgit.internal.transport.sshd.GssApiWithMicAuthentication
-
- All Implemented Interfaces:
org.apache.sshd.client.auth.UserAuth,org.apache.sshd.client.session.ClientSessionHolder,org.apache.sshd.common.auth.UserAuthInstance<org.apache.sshd.client.session.ClientSession>,org.apache.sshd.common.NamedResource
public class GssApiWithMicAuthentication extends org.apache.sshd.client.auth.AbstractUserAuthGSSAPI-with-MIC authentication handler (Kerberos 5).- See Also:
- RFC 4462
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classGssApiWithMicAuthentication.ProtocolState
-
Field Summary
Fields Modifier and Type Field Description private org.ietf.jgss.GSSContextcontextprivate org.ietf.jgss.OidcurrentMechanismprivate java.util.Collection<org.ietf.jgss.Oid>mechanismsprivate java.util.Iterator<org.ietf.jgss.Oid>nextMechanismprivate static byteSSH_MSG_USERAUTH_GSSAPI_RESPONSESynonym used in RFC 4462.private static byteSSH_MSG_USERAUTH_GSSAPI_TOKENSynonym used in RFC 4462.private GssApiWithMicAuthentication.ProtocolStatestate
-
Constructor Summary
Constructors Constructor Description GssApiWithMicAuthentication()Creates a newGssApiWithMicAuthentication.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidclose(boolean silent)voiddestroy()private java.lang.StringgetHostName(org.apache.sshd.client.session.ClientSession session)protected booleanprocessAuthDataRequest(org.apache.sshd.client.session.ClientSession session, java.lang.String service, org.apache.sshd.common.util.buffer.Buffer in)private voidreplyToken(org.apache.sshd.client.session.ClientSession session, java.lang.String service, byte[] bytes)protected booleansendAuthDataRequest(org.apache.sshd.client.session.ClientSession session, java.lang.String service)private voidsendMic(org.apache.sshd.client.session.ClientSession session, java.lang.String service)private voidsendToken(org.apache.sshd.client.session.ClientSession session, byte[] receivedToken)private booleanunexpectedMessage(int command)-
Methods inherited from class org.apache.sshd.client.auth.AbstractUserAuth
getClientSession, getName, getService, getSession, init, isCancellable, process, setCancellable, toString
-
Methods inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warn
-
-
-
-
Field Detail
-
SSH_MSG_USERAUTH_GSSAPI_RESPONSE
private static final byte SSH_MSG_USERAUTH_GSSAPI_RESPONSE
Synonym used in RFC 4462.- See Also:
- Constant Field Values
-
SSH_MSG_USERAUTH_GSSAPI_TOKEN
private static final byte SSH_MSG_USERAUTH_GSSAPI_TOKEN
Synonym used in RFC 4462.- See Also:
- Constant Field Values
-
mechanisms
private java.util.Collection<org.ietf.jgss.Oid> mechanisms
-
nextMechanism
private java.util.Iterator<org.ietf.jgss.Oid> nextMechanism
-
currentMechanism
private org.ietf.jgss.Oid currentMechanism
-
state
private GssApiWithMicAuthentication.ProtocolState state
-
context
private org.ietf.jgss.GSSContext context
-
-
Constructor Detail
-
GssApiWithMicAuthentication
public GssApiWithMicAuthentication()
Creates a newGssApiWithMicAuthentication.
-
-
Method Detail
-
sendAuthDataRequest
protected boolean sendAuthDataRequest(org.apache.sshd.client.session.ClientSession session, java.lang.String service) throws java.lang.Exception- Specified by:
sendAuthDataRequestin classorg.apache.sshd.client.auth.AbstractUserAuth- Throws:
java.lang.Exception
-
processAuthDataRequest
protected boolean processAuthDataRequest(org.apache.sshd.client.session.ClientSession session, java.lang.String service, org.apache.sshd.common.util.buffer.Buffer in) throws java.lang.Exception- Specified by:
processAuthDataRequestin classorg.apache.sshd.client.auth.AbstractUserAuth- Throws:
java.lang.Exception
-
destroy
public void destroy()
- Specified by:
destroyin interfaceorg.apache.sshd.client.auth.UserAuth- Overrides:
destroyin classorg.apache.sshd.client.auth.AbstractUserAuth
-
close
private void close(boolean silent)
-
sendToken
private void sendToken(org.apache.sshd.client.session.ClientSession session, byte[] receivedToken) throws java.io.IOException, org.ietf.jgss.GSSException- Throws:
java.io.IOExceptionorg.ietf.jgss.GSSException
-
sendMic
private void sendMic(org.apache.sshd.client.session.ClientSession session, java.lang.String service) throws java.io.IOException, org.ietf.jgss.GSSException- Throws:
java.io.IOExceptionorg.ietf.jgss.GSSException
-
replyToken
private void replyToken(org.apache.sshd.client.session.ClientSession session, java.lang.String service, byte[] bytes) throws java.io.IOException, org.ietf.jgss.GSSException- Throws:
java.io.IOExceptionorg.ietf.jgss.GSSException
-
getHostName
private java.lang.String getHostName(org.apache.sshd.client.session.ClientSession session)
-
unexpectedMessage
private boolean unexpectedMessage(int command)
-
-