|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LoginHandler
Handler for login/logout/roles/
Method Summary | |
---|---|
Principal |
getUserPrincipal(HttpServletRequest request)
Get the current user. |
boolean |
isUserInRole(String roleName,
HttpServletRequest request)
Tell whether the current user is in a given role. |
void |
login(String username,
String password,
HttpServletRequest request,
HttpServletResponse response)
Log in the given user. |
void |
logout(boolean invalidateSessions,
HttpServletRequest request,
HttpServletResponse response)
Log out the current user. |
Methods inherited from interface Handler |
---|
init, reinit |
Method Detail |
---|
void login(String username, String password, HttpServletRequest request, HttpServletResponse response) throws LoginException
username
- the user to log in.password
- the user's password.request
- the current HttpServletRequest.
LoginException
- if the login fails.void logout(boolean invalidateSessions, HttpServletRequest request, HttpServletResponse response)
invalidateSessions
- if true
, current sessions associated with the current
logged-in user will be invalidated.request
- the current HttpServletRequest.boolean isUserInRole(String roleName, HttpServletRequest request)
roleName
- the role to check.request
- the current HttpServletRequest.
true
if the current logged-in user is in the given role.Principal getUserPrincipal(HttpServletRequest request)
request
- the current HttpServletRequest.
Principal
that represents the current logged-in user.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |