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.AbstractUserAuth
GSSAPI-with-MIC authentication handler (Kerberos 5).- See Also:
- RFC 4462
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
GssApiWithMicAuthentication.ProtocolState
-
Field Summary
Fields Modifier and Type Field Description private org.ietf.jgss.GSSContext
context
private org.ietf.jgss.Oid
currentMechanism
private java.util.Collection<org.ietf.jgss.Oid>
mechanisms
private java.util.Iterator<org.ietf.jgss.Oid>
nextMechanism
private static byte
SSH_MSG_USERAUTH_GSSAPI_RESPONSE
Synonym used in RFC 4462.private static byte
SSH_MSG_USERAUTH_GSSAPI_TOKEN
Synonym used in RFC 4462.private GssApiWithMicAuthentication.ProtocolState
state
-
Constructor Summary
Constructors Constructor Description GssApiWithMicAuthentication()
Creates a newGssApiWithMicAuthentication
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
close(boolean silent)
void
destroy()
private java.lang.String
getHostName(org.apache.sshd.client.session.ClientSession session)
protected boolean
processAuthDataRequest(org.apache.sshd.client.session.ClientSession session, java.lang.String service, org.apache.sshd.common.util.buffer.Buffer in)
private void
replyToken(org.apache.sshd.client.session.ClientSession session, java.lang.String service, byte[] bytes)
protected boolean
sendAuthDataRequest(org.apache.sshd.client.session.ClientSession session, java.lang.String service)
private void
sendMic(org.apache.sshd.client.session.ClientSession session, java.lang.String service)
private void
sendToken(org.apache.sshd.client.session.ClientSession session, byte[] receivedToken)
private boolean
unexpectedMessage(int command)
-
Methods inherited from class org.apache.sshd.client.auth.AbstractUserAuth
getClientSession, getName, getService, getSession, init, process, toString
-
-
-
-
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:
sendAuthDataRequest
in 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:
processAuthDataRequest
in classorg.apache.sshd.client.auth.AbstractUserAuth
- Throws:
java.lang.Exception
-
destroy
public void destroy()
- Specified by:
destroy
in interfaceorg.apache.sshd.client.auth.UserAuth
- Overrides:
destroy
in 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.IOException
org.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.IOException
org.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.IOException
org.ietf.jgss.GSSException
-
getHostName
private java.lang.String getHostName(org.apache.sshd.client.session.ClientSession session)
-
unexpectedMessage
private boolean unexpectedMessage(int command)
-
-