Class SecurityTokenService
- java.lang.Object
-
- fr.paris.lutece.portal.service.security.SecurityTokenService
-
- All Implemented Interfaces:
ISecurityTokenService
public class SecurityTokenService extends Object implements ISecurityTokenService
This class provides a security service for getting and verify tokens
-
-
Field Summary
Fields Modifier and Type Field Description static StringMARK_TOKENstatic StringPARAMETER_TOKEN
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ISecurityTokenServicegetInstance()Returns the instance of the singletonStringgetToken(javax.servlet.http.HttpServletRequest request, String strAction)return a security tokenbooleanvalidate(javax.servlet.http.HttpServletRequest request, String strAction)verify if the request contains the securiy token
-
-
-
Field Detail
-
MARK_TOKEN
public static final String MARK_TOKEN
- See Also:
- Constant Field Values
-
PARAMETER_TOKEN
public static final String PARAMETER_TOKEN
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static ISecurityTokenService getInstance()
Returns the instance of the singleton- Returns:
- The instance of the singleton
-
getToken
public String getToken(javax.servlet.http.HttpServletRequest request, String strAction)
return a security token- Specified by:
getTokenin interfaceISecurityTokenService- Parameters:
request- The Http requeststrAction- the action type- Returns:
- a security token
-
validate
public boolean validate(javax.servlet.http.HttpServletRequest request, String strAction)verify if the request contains the securiy token- Specified by:
validatein interfaceISecurityTokenService- Parameters:
request- The Http requeststrAction- the action type- Returns:
- true if the request contains the security token associated to the action type
-
-