Top Description Methods
org.eclipse.jgit.internal.transport.sshd.auth

public Interface AuthenticationHandler<ParameterType, TokenType>

extends Closeable
Known Direct Subinterfaces
org.eclipse.jgit.internal.transport.sshd.proxy.HttpClientConnector.HttpAuthenticationHandler
Known Direct Implementers
org.eclipse.jgit.internal.transport.sshd.auth.AbstractAuthenticationHandler
Type Parameters
<ParameterType>
defining the parameter type for setParams(Object)
<TokenType>
defining the token type for getToken()
Imports
java.io.Closeable

An AuthenticationHandler encapsulates a possibly multi-step authentication protocol. Intended usage:
setParams(something);
start();
sendToken(getToken());
while (!isDone()) {
	setParams(receiveMessageAndExtractParams());
	process();
	Object t = getToken();
	if (t != null) {
		sendToken(t);
	}
}
An AuthenticationHandler may be stateful and therefore is a Closeable.

Method Summary

Modifier and TypeMethod and Description
public void
close()

Redeclares java.io.Closeable.close.

Closes this stream and releases any system resources associated with it.

public TokenType

Returns:

the token, or null if there is none
getToken
()

Retrieves the last token generated.

public boolean

Returns:

whether this authentication is done
isDone
()

Tells whether is authentication mechanism is done (successfully or unsuccessfully).

public void
process()

Produces the next authentication token, if any.

public void
setParams(ParameterType
to set, may be null
input
)

Sets the parameters for the next token generation via start() or process().

public void
start()

Produces the initial authentication token that can be then retrieved via getToken().

Method Detail

closeback to summary
public void close()

Redeclares java.io.Closeable.close.

Doc from java.io.Closeable.close.

Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect.

As noted in AutoCloseable#close(), cases where the close may fail require careful attention. It is strongly advised to relinquish the underlying resources and to internally mark the Closeable as closed, prior to throwing the IOException.

Annotations
@Override
getTokenback to summary
public TokenType getToken() throws Exception

Retrieves the last token generated.

Returns:TokenType

the token, or null if there is none

Exceptions
Exception:
if an error occurs
isDoneback to summary
public boolean isDone()

Tells whether is authentication mechanism is done (successfully or unsuccessfully).

Returns:boolean

whether this authentication is done

processback to summary
public void process() throws Exception

Produces the next authentication token, if any.

Exceptions
Exception:
if an error occurs
setParamsback to summary
public void setParams(ParameterType input)

Sets the parameters for the next token generation via start() or process().

Parameters
input:ParameterType

to set, may be null

startback to summary
public void start() throws Exception

Produces the initial authentication token that can be then retrieved via getToken().

Exceptions
Exception:
if an error occurs