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:
java.io.Closeable
,java.lang.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.
-
-
Constructor Summary
Constructors Constructor Description GssApiAuthentication(java.net.InetSocketAddress proxy)
Creates a newGssApiAuthentication
to authenticate with the givenproxy
.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description private void
checkDone()
void
close()
protected abstract org.ietf.jgss.GSSContext
createContext()
Creates theGSSContext
to use.protected abstract byte[]
extractToken(ParameterType input)
Extracts the token from the last set parameters.void
process()
Produces the next authentication token, if any.void
start()
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, setParams
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.jgit.internal.transport.sshd.auth.AuthenticationHandler
getToken
-
-
-
-
Constructor Detail
-
GssApiAuthentication
public GssApiAuthentication(java.net.InetSocketAddress proxy)
Creates a newGssApiAuthentication
to authenticate with the givenproxy
.- Parameters:
proxy
- theInetSocketAddress
of the proxy to connect to
-
-
Method Detail
-
close
public void close()
-
start
public final void start() throws java.lang.Exception
Description copied from interface:AuthenticationHandler
Produces the initial authentication token that can be then retrieved viaAuthenticationHandler.getToken()
.- Throws:
java.lang.Exception
- if an error occurs
-
process
public final void process() throws java.lang.Exception
Description copied from interface:AuthenticationHandler
Produces the next authentication token, if any.- Throws:
java.lang.Exception
- if an error occurs
-
checkDone
private void checkDone() throws java.lang.Exception
- Throws:
java.lang.Exception
-
createContext
protected abstract org.ietf.jgss.GSSContext createContext() throws java.lang.Exception
Creates theGSSContext
to use.- Returns:
- a fresh
GSSContext
to use - Throws:
java.lang.Exception
- if the context cannot be created
-
extractToken
protected abstract byte[] extractToken(ParameterType input) throws java.lang.Exception
Extracts the token from the last set parameters.- Parameters:
input
- to extract the token from- Returns:
- the extracted token, or
null
if none - Throws:
java.lang.Exception
- if an error occurs
-
-