Class GssApiAuthentication<ParameterType,TokenType>
java.lang.Object
org.eclipse.jgit.internal.transport.sshd.auth.AbstractAuthenticationHandler<ParameterType,TokenType>
org.eclipse.jgit.internal.transport.sshd.auth.GssApiAuthentication<ParameterType,TokenType>
- Type Parameters:
ParameterType- defining the parameter type for the authenticationTokenType- defining the token type for the authentication
- All Implemented Interfaces:
Closeable,AutoCloseable,AuthenticationHandler<ParameterType,TokenType>
- Direct Known Subclasses:
HttpClientConnector.NegotiateAuthentication,Socks5ClientConnector.SocksGssApiAuthentication
public abstract class GssApiAuthentication<ParameterType,TokenType>
extends AbstractAuthenticationHandler<ParameterType,TokenType>
An abstract implementation of a GSS-API multi-round authentication.
-
Field Summary
FieldsFields inherited from class org.eclipse.jgit.internal.transport.sshd.auth.AbstractAuthenticationHandler
done, params, proxy -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidvoidclose()protected abstract GSSContextCreates theGSSContextto use.protected abstract byte[]extractToken(ParameterType input) Extracts the token from the last set parameters.final voidprocess()Produces the next authentication token, if any.final voidstart()Produces the initial authentication token that can be then retrieved viaAuthenticationHandler.getToken().Methods inherited from class org.eclipse.jgit.internal.transport.sshd.auth.AbstractAuthenticationHandler
isDone, setParamsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.jgit.internal.transport.sshd.auth.AuthenticationHandler
getToken
-
Field Details
-
context
-
token
protected byte[] tokenThe last token generated.
-
-
Constructor Details
-
GssApiAuthentication
Creates a newGssApiAuthenticationto authenticate with the givenproxy.- Parameters:
proxy- theInetSocketAddressof the proxy to connect to
-
-
Method Details
-
close
public void close() -
start
Description copied from interface:AuthenticationHandlerProduces the initial authentication token that can be then retrieved viaAuthenticationHandler.getToken().- Throws:
Exception- if an error occurs
-
process
Description copied from interface:AuthenticationHandlerProduces the next authentication token, if any.- Throws:
Exception- if an error occurs
-
checkDone
- Throws:
Exception
-
createContext
Creates theGSSContextto use.- Returns:
- a fresh
GSSContextto use - Throws:
Exception- if the context cannot be created
-
extractToken
Extracts the token from the last set parameters.- Parameters:
input- to extract the token from- Returns:
- the extracted token, or
nullif none - Throws:
Exception- if an error occurs
-