|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.paris.lutece.portal.service.security.SecurityService
public final class SecurityService
This class provides a security service to register and check user authentication
Method Summary | |
---|---|
java.lang.String |
getAccessControledTemplate()
Returns the access controled template |
java.lang.String |
getAccessDeniedTemplate()
Returns the access denied template |
java.lang.String |
getDoLoginUrl()
Returns the DoLogin URL of the Authentication Service |
java.lang.String |
getDoLogoutUrl()
Returns the DoLogout URL of the Authentication Service |
static SecurityService |
getInstance()
Get the unique instance of the Security Service |
java.lang.String |
getLoginPageUrl()
Returns the Login page URL of the Authentication Service |
java.lang.String |
getLostPasswordPageUrl()
Returns the lost password URL of the Authentication Service |
java.lang.String |
getNewAccountPageUrl()
Returns the new account page URL of the Authentication Service |
LuteceUser |
getRegisteredUser(javax.servlet.http.HttpServletRequest request)
Gets the Lutece user registered in the Http session |
LuteceUser |
getRemoteUser(javax.servlet.http.HttpServletRequest request)
Gets the LuteceUser attached to the current Http session |
java.security.Principal |
getUserPrincipal(javax.servlet.http.HttpServletRequest request)
Returns the user's principal |
java.lang.String |
getViewAccountPageUrl()
Returns the view account page URL of the Authentication Service |
static void |
init()
Initialize service |
static boolean |
isAuthenticationEnable()
Returns the authentication's activation : enable or disable |
boolean |
isExternalAuthentication()
Returns the authentication type : External or Lutece portal based |
boolean |
isPortalAuthenticationRequired()
Returns whether or not the portal needs authentication |
boolean |
isUserInRole(javax.servlet.http.HttpServletRequest request,
java.lang.String strRole)
Checks if the user is associated to a given role |
void |
loginUser(javax.servlet.http.HttpServletRequest request,
java.lang.String strUserName,
java.lang.String strPassword)
Checks user's login with the Authentication service. |
void |
logoutUser(javax.servlet.http.HttpServletRequest request)
Logout the user |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void init() throws LuteceInitException
LuteceInitException
public static SecurityService getInstance()
public static boolean isAuthenticationEnable()
public LuteceUser getRemoteUser(javax.servlet.http.HttpServletRequest request) throws UserNotSignedException
request
- The Http request
UserNotSignedException
- If there is no current userpublic java.security.Principal getUserPrincipal(javax.servlet.http.HttpServletRequest request) throws UserNotSignedException
request
- The HTTP request
UserNotSignedException
- The UserNotSignedExceptionpublic boolean isUserInRole(javax.servlet.http.HttpServletRequest request, java.lang.String strRole)
request
- The Http requeststrRole
- The Role name
public void loginUser(javax.servlet.http.HttpServletRequest request, java.lang.String strUserName, java.lang.String strPassword) throws javax.security.auth.login.LoginException
request
- The Http requeststrUserName
- The user's loginstrPassword
- The user's password
javax.security.auth.login.LoginException
- The LoginExceptionpublic void logoutUser(javax.servlet.http.HttpServletRequest request)
request
- The HTTP requestpublic LuteceUser getRegisteredUser(javax.servlet.http.HttpServletRequest request)
request
- The HTTP request
public boolean isExternalAuthentication()
public java.lang.String getLoginPageUrl()
public java.lang.String getDoLoginUrl()
public java.lang.String getDoLogoutUrl()
public java.lang.String getNewAccountPageUrl()
public java.lang.String getViewAccountPageUrl()
public java.lang.String getLostPasswordPageUrl()
public java.lang.String getAccessDeniedTemplate()
public java.lang.String getAccessControledTemplate()
public boolean isPortalAuthenticationRequired()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |