org.openuat.authentication
Interface AuthenticationProgressHandler

All Known Implementing Classes:
BedaApp, BedaMIDlet, BluetoothDemo, BluetoothOpportunisticConnector.AuthenticationEventsHandler, BluetoothRFCOMMChannel.TempHandler, DHWithVerification.HostAuthenticationEventHandler, IPSecConnectorAdmin, IPSecConnectorClient, IPSecConnectorCommon, ManualAuthentication, OpenUATmidlet, OpenUATtoolkit.TempHandler

public interface AuthenticationProgressHandler

This interface defines a listener for authentication events.

Version:
1.1, changes since 1.0: added AuthenticationStarted method
Author:
Rene Mayrhofer

Method Summary
 void AuthenticationFailure(java.lang.Object sender, java.lang.Object remote, java.lang.Exception e, java.lang.String msg)
          Upon authentication failure, an exception might have been thrown and a message might have been created.
 void AuthenticationProgress(java.lang.Object sender, java.lang.Object remote, int cur, int max, java.lang.String msg)
          This event is raised during the authentication protocol to indicate progress.
 boolean AuthenticationStarted(java.lang.Object sender, java.lang.Object remote)
          This event is raised when the authentication protocol is started, to indicate that further events might follow.
 void AuthenticationSuccess(java.lang.Object sender, java.lang.Object remote, java.lang.Object result)
          Upon successful authentication, the established shared key can be used with the remote host.
 

Method Detail

AuthenticationSuccess

void AuthenticationSuccess(java.lang.Object sender,
                           java.lang.Object remote,
                           java.lang.Object result)
Upon successful authentication, the established shared key can be used with the remote host. The type of the remoteHost object depends on the sender of the event, e.g. an InetAddress object for HostProtocolHandler generated events, but an Integer for DongleProtocolHandler generated events (encapsulating the remote relate id).

Parameters:
sender - The object which sent this event.
remote - The remote end with which the authentication is performed. Depends on the sender of the event.
result - The result, if any, of the successful authentication. This can e.g. be a shared key or a set of keys or can even be null if the authentication event is enough to signal successful authentication.

AuthenticationFailure

void AuthenticationFailure(java.lang.Object sender,
                           java.lang.Object remote,
                           java.lang.Exception e,
                           java.lang.String msg)
Upon authentication failure, an exception might have been thrown and a message might have been created.

Parameters:
sender - The object which sent this event.
e - Reason for the failue, can be null.
msg - Reaseon for the failue, can be null

AuthenticationProgress

void AuthenticationProgress(java.lang.Object sender,
                            java.lang.Object remote,
                            int cur,
                            int max,
                            java.lang.String msg)
This event is raised during the authentication protocol to indicate progress.

Parameters:
sender - The object which sent this event.
remote - The remote end with which the authentication is performed.
cur - The current stage in the authentication.
max - The maximum number of stages.
msg - If not null, a message describing the last successful stage.

AuthenticationStarted

boolean AuthenticationStarted(java.lang.Object sender,
                              java.lang.Object remote)
This event is raised when the authentication protocol is started, to indicate that further events might follow.

Parameters:
sender - The object which sent this event.
remote - The remote end with which the authentication is performed. Depends on the sender of the event.
Returns:
true if the handler accepts this authentication to be started, false to "veto" it. If any of the registered handlers (which are called in the order in which they were registered) returns false, the (incoming or outgoing) authentication is aborted.


2005-2009, Rene Mayrhofer.