com.webmethods.caf.wsclient.auth
Interface IFailedAuthCallback

All Known Implementing Classes:
SamlFailedAuthCallback

public interface IFailedAuthCallback

Objects that implement this interface can be registered with WSClient and will be notified when a failed authentication exception is thrown. The IFailedAuthCallback implementation has the option of returning new AuthCredentials to retry with, or null to discontinue authentication and fail. The IFailedAuthCallback implemention is registered via WsClient.addFailedAuthCallback().


Method Summary
 boolean allowRetries()
          When this callback provides new AuthCredentials to retry with, allow additional retries (and callbacks for alternate credentials if they fail again).
 AuthCredentials onFailedAuth(AuthCredentials failedAuthCred, String serviceEndpoint, Throwable throwable)
          Callback method invoked by WsClient when an authentication failure occurs.
 

Method Detail

onFailedAuth

AuthCredentials onFailedAuth(AuthCredentials failedAuthCred,
                             String serviceEndpoint,
                             Throwable throwable)
Callback method invoked by WsClient when an authentication failure occurs.

Parameters:
failedAuthCred - the AuthCredentials used in the previous failed authentication attempt
serviceEndpoint - the service endpoint as String
throwable - the exception thrown by the WsClient connection attempt
Returns:
an alternate AuthCredentials to retry auth with, or null to discontinue the authentication process

allowRetries

boolean allowRetries()
When this callback provides new AuthCredentials to retry with, allow additional retries (and callbacks for alternate credentials if they fail again).

Returns:
true to continue looping for credentials