com.sun.im.service
Interface AuthenticationListener

All Superinterfaces:
CollaborationSessionListener

public interface AuthenticationListener
extends CollaborationSessionListener

Listener which is used to query the choice of authentication mechanism to be used. Note: If the server does not support SASL or does not return any authentication 'features' , for backwardly compatibility , we do not invoke this listener but directly proceed to jabber iq auth.

Author:
Mridul Muralidharan

Field Summary
static java.lang.String JABBER_IQ_AUTH_MECHANISM
          The old jabber iq auth mechanism name.
 
Method Summary
 void authenticationComplete()
          called by API after the authentication nego is complete.
 int useAuthenticationMechanism(java.lang.String[] mechanisms)
          Called by the API implementation to find which mechanism to use.
 
Methods inherited from interface com.sun.im.service.CollaborationSessionListener
onError
 

Field Detail

JABBER_IQ_AUTH_MECHANISM

public static final java.lang.String JABBER_IQ_AUTH_MECHANISM
The old jabber iq auth mechanism name.

See Also:
Constant Field Values
Method Detail

useAuthenticationMechanism

public int useAuthenticationMechanism(java.lang.String[] mechanisms)
Called by the API implementation to find which mechanism to use. The parameter array is the subset of valid auth mechanism's which is supported by both the server and the client api (including supported plugin auth mechanisms).

Returns:
The index of which mechanism to be used. An invalid index outside the range [0 , mechanisms.length - 1] can be used to indicate that client is not interested in using any of the supplied mechanim's. This will result in auth failing with a CollaborationException getting thrown.

authenticationComplete

public void authenticationComplete()
called by API after the authentication nego is complete. this is only a notification. This is not called if auth fails. In that case getSession fails.