edu.utexas.its.eis.tools.qwicap.servlet
Interface Auth2Scheme


public interface Auth2Scheme

Classes that implement this interface provide Qwicap with its authentication & authorization (Auth2) functionality. Every hit is passed to the qwicapAuth2SchemeHit method for approval. Approved hits are passed along to your Qwicap web application, while unapproved hits do nothing. Implementations will probably want to indicate disapproval to users by one of the following means:

Instances of Auth2Scheme are provided to Qwicap by an instance of a class implementing the Auth2SchemeFactory interface. Qwicap discovers that factory class through an entry in the web application deployment descriptor ("web.xml" file). See the Auth2SchemeFactory documentation for complete details.

Author:
Chris W. Johnson
See Also:
Auth2SchemeFactory, Auth2SchemeReply

Method Summary
 Auth2SchemeReply qwicapAuth2SchemeHit(Servlet Serv, HttpServletRequest Req, HttpServletResponse Resp, FormDataSet FDS)
          Implements an authentication & authorization scheme that determines how Qwicap will respond to each hit.
 boolean qwicapShouldRetainThisAuth2SchemeInstance()
          Returns true to inform the servlet that this Auth2Scheme instance should be retained as part of the current user's session state, and should be used to evaluate the next hit received from this user.
 

Method Detail

qwicapAuth2SchemeHit

Auth2SchemeReply qwicapAuth2SchemeHit(Servlet Serv,
                                      HttpServletRequest Req,
                                      HttpServletResponse Resp,
                                      FormDataSet FDS)
                                      throws Exception
Implements an authentication & authorization scheme that determines how Qwicap will respond to each hit.

Parameters:
Serv - The active servlet.
Req - The current request.
Resp - The current response.
FDS - The FormDataSet instance describing the form data set, or URI attributes, that were sent with, or otherwise associated with, the latest hit. Note: Modification of the contents of this FormDataSet instance is possible, but strongly discouraged, because, in general, a FormDataSetFilter should be used for that purpose.
Returns:
An object implementing the Auth2SchemeReply interface.
Throws:
Exception - Thrown if anything goes wrong. The hit is discarded in such cases.

qwicapShouldRetainThisAuth2SchemeInstance

boolean qwicapShouldRetainThisAuth2SchemeInstance()
Returns true to inform the servlet that this Auth2Scheme instance should be retained as part of the current user's session state, and should be used to evaluate the next hit received from this user. Returns false to indicate that this Auth2Scheme instance should be discarded, in which case a new instance will be created to evaluate the next hit.

Returns:
true, if this instance should be stored and reused by this session, false if it should be discarded.