|
Expresso 5-5-0 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jcorporate.expresso.core.servlet.CheckLogin
CheckLogin accepts an HttpServletRequest and HttpServletResponse object
pair, and attempts to check if the user is logged in.
If not, CheckLogin tries to log the user in via a cookie from the
client. If this is not possible, the user is logged in as "NONE".
It has now been modified to be a Singleton Object rather than having a new
object allocated with each request.
Example Usage:
CheckLogin.getInstance().checkLogin(request,response);
| Constructor Summary | |
protected |
CheckLogin()
Default Constructor.... |
| Method Summary | |
void |
checkLogin(HttpServletRequest request,
HttpServletResponse response)
Constructor. |
void |
checkLogin(HttpServletRequest request,
HttpServletResponse response,
ServletConfig c)
Enhanced Constructor. |
void |
checkLogin(HttpServletRequest request,
HttpServletResponse response,
ServletConfig c,
String forceDB)
Enhanced Constructor. |
static CheckLogin |
getInstance()
|
void |
logInAsNone(HttpServletRequest request,
String forceDB)
For some reason a login session could not be established, so log the user in as the "unknown" user "NONE" |
boolean |
loginViaContainer(HttpServletRequest request,
String forceDB)
Try to log in with a user name obtained from the container. |
boolean |
loginViaCookie(HttpServletRequest request,
String forceDB)
Try to log in via the cookie from the client - if successful, return true. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
protected CheckLogin()
| Method Detail |
public static CheckLogin getInstance()
public void checkLogin(HttpServletRequest request,
HttpServletResponse response,
ServletConfig c,
String forceDB)
throws ServletException,
NonHandleableException,
IOException
request - Standard request objectresponse - Standard response objectc - ServletConfig object of the calling servletforceDB - the db to force a login to
ServletException - If an uncaught exception occurs
IOException - If an I/O error occurs while communicating
with the client
NonHandleableException - upon fatal error
public void checkLogin(HttpServletRequest request,
HttpServletResponse response,
ServletConfig c)
throws ServletException,
NonHandleableException,
IOException
request - Standard request objectresponse - Standard response objectc - ServletConfig object of the calling servlet
ServletException - If an uncaught exception occurs
IOException - If an I/O error occurs while communicating
with the client
NonHandleableException - upon fatal error
public void checkLogin(HttpServletRequest request,
HttpServletResponse response)
throws ServletException,
NonHandleableException,
IOException
request - Standard request objectresponse - Standard response object
ServletException - If an uncaught exception occurs
IOException - If an I/O error occurs while communicating
with the client
NonHandleableException - upon fatal error
public void logInAsNone(HttpServletRequest request,
String forceDB)
throws ServletException
request - the servlet request objectforceDB - the data context to log into
ServletException
public boolean loginViaContainer(HttpServletRequest request,
String forceDB)
throws Exception
request - The request objectforceDB - Name of default database to set
Exception - upon error
public boolean loginViaCookie(HttpServletRequest request,
String forceDB)
throws Exception
request - the servlet request objectforceDB - the data context to login to
Exception - upon error
|
Expresso 5-5-0 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||