|
Version 4.10.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LoginTasks
Perform tasks required after successful user login.
See BuildImpl
for important information on how this item is configured.
BuildImpl.forLoginTasks()
returns the configured implementation of this interface.
There is no default implementation of this interface. You must supply one.
(You can always supply an implmentation that does nothing, if you wish.)
This interface exists to allow an application to react to successful user logins. At least one of those tasks must put an item in session scope. The web4j Controller will use the presence/absence of that item to determine if the login tasks have already been performed.
Example tasks :
ActionImpl.USER_ID
as its key.
Doing so lets your Actions easily access the id using ActionImpl.getUserId()
.
LocaleSource
and TimeZoneSource
are not consistent with such a style, since they expect their data to be stored under separate
keys defined in Controller
.
Method Summary | |
---|---|
boolean |
hasAlreadyReacted(HttpSession aSession)
Return true only if the user login has already been processed by reactToUserLogin(HttpSession, HttpServletRequest) . |
void |
reactToUserLogin(HttpSession aExistingSession,
HttpServletRequest aRequest)
React to a successful user log in. |
Method Detail |
---|
void reactToUserLogin(HttpSession aExistingSession, HttpServletRequest aRequest) throws AppException
This method is called only if all of the following are true:
hasAlreadyReacted(HttpSession)
returns false
AppException
boolean hasAlreadyReacted(HttpSession aSession)
reactToUserLogin(HttpSession, HttpServletRequest)
.
Typically, implementations will simply return true only if an item of a given name is already in session scope.
|
Version 4.10.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |