org.eclipse.higgins.rp
Class AuthProtocolHandler

java.lang.Object
  extended byorg.eclipse.higgins.rp.AuthProtocolHandler
All Implemented Interfaces:
Serializable

public abstract class AuthProtocolHandler
extends Object
implements Serializable

The top level interface for the protocol finite state machine handler. At each step of the authentication process the relying party application can call authenticate to continue the authentication process passing in the parameters (POST and query) in the current request for the user.

See Also:
Serialized Form

Field Summary
static String AUTH_SESSION_PARAM
          query parameter which contains the value of the authentication session for the current request
 
Constructor Summary
AuthProtocolHandler()
           
 
Method Summary
 String addAuthSessionToLocation(String location)
          Utility function which adds the authentication context as a request parameter
abstract  void authenticate(Map requestHeaders, Map requestParams)
          Call to initiate or continue the authentication process.
abstract  List getOptionalClaims()
          Getter method for the list of optional Claims
abstract  List getRequiredClaims()
          Getter method for the list of required Claims
 String getSessionId()
          Returns a session ID which is bound to the authentication session
static String getSupportedTokenName()
          Static token method which MUST be over-ridden by the subclass
static void init(Map initParams)
          Protocol handler specific initialization.
abstract  void registerCallbacks(ResultCallback resultCallback, DispatchCallback dispatchCallback, SessionContext sCtxt)
          Register callbacks to be be used in the authentication process
abstract  void setOptionalClaims(List optionalClaims)
           
abstract  void setRequiredClaims(List requiredClaims)
          Calls to initialize this object with the list of required and optional claim types.
 void setSessionId(String sessionId)
          Sets the sessionID bound to this authentication session
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AUTH_SESSION_PARAM

public static final String AUTH_SESSION_PARAM
query parameter which contains the value of the authentication session for the current request

See Also:
Constant Field Values
Constructor Detail

AuthProtocolHandler

public AuthProtocolHandler()
Method Detail

getSessionId

public String getSessionId()
Returns a session ID which is bound to the authentication session


setSessionId

public void setSessionId(String sessionId)
Sets the sessionID bound to this authentication session


registerCallbacks

public abstract void registerCallbacks(ResultCallback resultCallback,
                                       DispatchCallback dispatchCallback,
                                       SessionContext sCtxt)
Register callbacks to be be used in the authentication process

Parameters:
resultCallback - to notify the application at the end of the process
dispatchCallback - used to have the app server redirect to other resources
sCtxt - sessionContext used to store attributes and obtain other context parameters

authenticate

public abstract void authenticate(Map requestHeaders,
                                  Map requestParams)
Call to initiate or continue the authentication process.

Parameters:
requestParams - both the POST as well as query params in the string

setRequiredClaims

public abstract void setRequiredClaims(List requiredClaims)
Calls to initialize this object with the list of required and optional claim types. This is done on a per protected resource basis to support the use case that different resources require different claims


setOptionalClaims

public abstract void setOptionalClaims(List optionalClaims)

init

public static void init(Map initParams)
Protocol handler specific initialization. Subclasses SHOULD override this method

Parameters:
initParams -

getSupportedTokenName

public static String getSupportedTokenName()
Static token method which MUST be over-ridden by the subclass


getRequiredClaims

public abstract List getRequiredClaims()
Getter method for the list of required Claims


getOptionalClaims

public abstract List getOptionalClaims()
Getter method for the list of optional Claims


addAuthSessionToLocation

public String addAuthSessionToLocation(String location)
Utility function which adds the authentication context as a request parameter

Parameters:
location -