ParameterType
- defining the parameter type for the authenticationTokenType
- defining the token type for the authenticationpublic abstract class GssApiAuthentication<ParameterType,TokenType> extends AbstractAuthenticationHandler<ParameterType,TokenType>
Modifier and Type | Field and Description |
---|---|
private org.ietf.jgss.GSSContext |
context |
protected byte[] |
token
The last token generated.
|
done, params, proxy
Constructor and Description |
---|
GssApiAuthentication(java.net.InetSocketAddress proxy)
Creates a new
GssApiAuthentication to authenticate with the given
proxy . |
Modifier and Type | Method and Description |
---|---|
private void |
checkDone() |
void |
close() |
protected abstract org.ietf.jgss.GSSContext |
createContext()
Creates the
GSSContext 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 via
AuthenticationHandler.getToken() . |
isDone, setParams
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getToken
private org.ietf.jgss.GSSContext context
protected byte[] token
public GssApiAuthentication(java.net.InetSocketAddress proxy)
GssApiAuthentication
to authenticate with the given
proxy
.proxy
- the InetSocketAddress
of the proxy to connect topublic void close()
public final void start() throws java.lang.Exception
AuthenticationHandler
AuthenticationHandler.getToken()
.java.lang.Exception
- if an error occurspublic final void process() throws java.lang.Exception
AuthenticationHandler
java.lang.Exception
- if an error occursprivate void checkDone() throws java.lang.Exception
java.lang.Exception
protected abstract org.ietf.jgss.GSSContext createContext() throws java.lang.Exception
GSSContext
to use.GSSContext
to usejava.lang.Exception
- if the context cannot be createdprotected abstract byte[] extractToken(ParameterType input) throws java.lang.Exception
input
- to extract the token fromnull
if nonejava.lang.Exception
- if an error occurs