|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfi.paatti.paattiloginutils.LoginHelper
public class LoginHelper
The helper class for user login. It handles the login and and controls the cookies. It creates an User object that has users groups, roles and researches.
![]() |
![]() |
| Constructor Summary | |
|---|---|
LoginHelper(fi.paatti.paattidatabaseutils.dbservice.PaattiDBService db,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
The constructor. |
|
| Method Summary | |
|---|---|
void |
deleteLoginCookie(String usernameCookieName,
String passwordCookieName,
String cookiePath)
Removes the specified login cookie from the browser memory. |
fi.paatti.paattidatabaseutils.dbobjects.User |
getUser(String username,
String password)
Returns the User object using the given username and password. |
void |
setLoginCookie(String usernameCookieName,
String username,
String passwordCookieName,
String password,
String cookiePath,
int cookieLifetime)
Sets the login cookies in the browser memory. |
void |
setRequest(javax.servlet.http.HttpServletRequest request)
Sets the HttpServletRequest. |
void |
setResponse(javax.servlet.http.HttpServletResponse response)
Sets the HttpServletResponse. |
fi.paatti.paattidatabaseutils.dbobjects.User |
TryLoginWithCookies(String usernameCookieName,
String passwordCookieName)
Tries to log in with the browser cookies. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LoginHelper(fi.paatti.paattidatabaseutils.dbservice.PaattiDBService db,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
db - the database service to be used.request - the HttpServletRequest.response - the HttpServletResponse.| Method Detail |
|---|
public void setRequest(javax.servlet.http.HttpServletRequest request)
request - the HttpServletRequest to be set.public void setResponse(javax.servlet.http.HttpServletResponse response)
response - the HttpServletResponse to be set.
public fi.paatti.paattidatabaseutils.dbobjects.User getUser(String username,
String password)
username - the user's name.password - the user's password.
public fi.paatti.paattidatabaseutils.dbobjects.User TryLoginWithCookies(String usernameCookieName,
String passwordCookieName)
usernameCookieName - the name of the cookie containing the user name.passwordCookieName - the name of the cookie containing the user password.
public void setLoginCookie(String usernameCookieName,
String username,
String passwordCookieName,
String password,
String cookiePath,
int cookieLifetime)
usernameCookieName - the user name cookie name.username - the user name.passwordCookieName - the password cookie name.cookieLifetime - the lifetime of the cookie.password - the user's password.cookiePath - the path to cookie.
public void deleteLoginCookie(String usernameCookieName,
String passwordCookieName,
String cookiePath)
usernameCookieName - the user name cookie name.passwordCookieName - the password cookie name.cookiePath - the path for the cookie.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||