DJDoc v.1.0.0b-1

net.sf.djdoc.app
Class SimpleUserStrategy

java.lang.Object
  extended by net.sf.djdoc.app.UserStrategy
      extended by net.sf.djdoc.app.SimpleUserStrategy

public class SimpleUserStrategy
extends UserStrategy

The SimpleUserStrategy class is an implementation of the UserStrategy class which - like the SameUserStrategy class - does not interact with the container for authentication; every user accessing the system for the first time will be given a unique name (actually the current timestamp with millisecond precision) which is stored in a cookie.


Constructor Summary
SimpleUserStrategy()
           
 
Method Summary
 User authenticate(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          This implementation of the abstract UserStrategy.authenticate(HttpServletRequest, HttpServletResponse) method always returns an (existing or new) User with the name specified by the timestamp at which the user accessed the system for the first time.
 
Methods inherited from class net.sf.djdoc.app.UserStrategy
findUserInDatabase, getStrategy, retrieveUserNameFromCookie, setup, storeUserNameInCookie
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleUserStrategy

public SimpleUserStrategy()
Method Detail

authenticate

public User authenticate(javax.servlet.http.HttpServletRequest req,
                         javax.servlet.http.HttpServletResponse res)
This implementation of the abstract UserStrategy.authenticate(HttpServletRequest, HttpServletResponse) method always returns an (existing or new) User with the name specified by the timestamp at which the user accessed the system for the first time.

Specified by:
authenticate in class UserStrategy
Parameters:
req - The current HTTP request object
res - The current HTTP response object
Returns:
An existing (or a new) User object named by the timestamp of the user's first access to the system.

DJDoc v.1.0.0b-1