Spiffy UI Framework

org.spiffyui.client.rest.v2
Interface RESTAuthProvider

All Superinterfaces:
RESTAuthConstants, RESTAuthProvider

public interface RESTAuthProvider
extends RESTAuthProvider

This interface allows clients to perform custom login handling.

The first version of this interface works well for standard Spiffy UI authentication, but it doesn't give clients access to the entire request which prevent them from handling more complex authentication schemes like some types of SAML. This interface gives the client access to the full response from the server when prompting for a login.


Field Summary
 
Fields inherited from interface org.spiffyui.client.rest.util.RESTAuthConstants
AUTH_LOGOUT_URL_TOKEN, AUTH_URL_TOKEN, GONE, INVALID_AUTH_HEADER, INVALID_INPUT, INVALID_JSON, INVALID_LOGIN_REQUEST, INVALID_LOGOUT_REQUEST, INVALID_TS_URL, MULTIPLE_ACCOUNTS, NO_PRIVILEGE, NOTFOUND_TS_URL, PASSWORD_TOKEN, USER_TOKEN, USERNAME_TOKEN
 
Method Summary
 void showLogin(RESTCallback callback, java.lang.String tokenServerUrl, Response response, RESTException exception)
           Show the login dialog.
 
Methods inherited from interface org.spiffyui.client.rest.RESTAuthProvider
finishRESTCall, getServletContext, login, logout, showLogin
 

Method Detail

showLogin

void showLogin(RESTCallback callback,
               java.lang.String tokenServerUrl,
               Response response,
               RESTException exception)

Show the login dialog.

This method is called when a REST call results in a 401 which requires login. The default implementation of this method shows a login dialog, but it could redirect to another page or simply show an error message.

Parameters:
callback - the callback for the original REST call
tokenServerUrl - the URL for the authentication server
response - the server response that came with this 401
exception - the RESTException representation of the JSON response from the server if available

Spiffy UI Framework