|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.scooterframework.security.LoginHelper
public class LoginHelper
LoginHelper class has helper methods for login related requests.
Field Summary | |
---|---|
static java.lang.String |
SESSION_KEY_LOGIN_PASSWORD
|
static java.lang.String |
SESSION_KEY_LOGIN_USER_ID
|
static java.lang.String |
SESSION_KEY_LOGIN_USER_OBJECT
|
Constructor Summary | |
---|---|
LoginHelper()
|
Method Summary | |
---|---|
static void |
cacheLoggedInPassword(java.lang.Object password)
Stores logged-in user's password to the user's http session. |
static void |
cacheLoggedInUser(ActiveRecord user)
Stores logged-in user record to the user's http session. |
static void |
cacheLoggedInUserId(java.lang.Object userId)
Stores logged-in user's id to the user's http session. |
static boolean |
isAdminLoggedIn()
Checks if the admin user is already logged in. |
static boolean |
isLoggedIn()
Checks if the current user is already logged in. |
static boolean |
isLoggedInUser(java.lang.Object testUserId)
Checks if a user id is the logged-in user id. |
static java.lang.String |
loginPassword()
Returns the password of the current logged-in user which has been saved to session. |
static ActiveRecord |
loginUser()
Returns the current logged-in user record which has been saved to session. |
static java.lang.String |
loginUserId()
Returns user id of the current logged-in user record which has been saved to session. |
static void |
userLogin(ActiveRecord user)
Stores user instance to session. |
static void |
userLogout()
Do something when logging out. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String SESSION_KEY_LOGIN_PASSWORD
public static final java.lang.String SESSION_KEY_LOGIN_USER_ID
public static final java.lang.String SESSION_KEY_LOGIN_USER_OBJECT
Constructor Detail |
---|
public LoginHelper()
Method Detail |
---|
public static java.lang.String loginUserId()
public static java.lang.String loginPassword()
public static ActiveRecord loginUser()
public static boolean isLoggedIn()
public static boolean isAdminLoggedIn()
public static void cacheLoggedInUser(ActiveRecord user)
user
- an ActiveRecord instance.public static void cacheLoggedInUserId(java.lang.Object userId)
userId
- the login user idpublic static void cacheLoggedInPassword(java.lang.Object password)
password
- the login passwordpublic static boolean isLoggedInUser(java.lang.Object testUserId)
testUserId
- user id to be tested.
public static void userLogin(ActiveRecord user)
user
- an ActiveRecord instance representing a user/accountpublic static void userLogout()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |