setParams(Object)
getToken()
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.
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Redeclares java. Closes this stream and releases any system resources associated with it. |
| public TokenType | |
| public boolean | Returns: whether this authentication is doneTells whether is authentication mechanism is done (successfully or unsuccessfully). |
| public void | |
| public void | |
| public void |
| close | back to summary |
|---|---|
| public void close() Redeclares java. Doc from java. 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
| |
| getToken | back to summary |
|---|---|
| public TokenType getToken() throws Exception Retrieves the last token generated.
| |
| isDone | back to summary |
|---|---|
| public boolean isDone() Tells whether is authentication mechanism is done (successfully or unsuccessfully).
| |
| process | back to summary |
|---|---|
| public void process() throws Exception Produces the next authentication token, if any.
| |
| setParams | back to summary |
|---|---|
| public void setParams(ParameterType input) Sets the parameters for the next token generation via
| |
| start | back to summary |
|---|---|
| public void start() throws Exception Produces the initial authentication token that can be then retrieved via
| |