Class SecurityTokenService
java.lang.Object
fr.paris.lutece.portal.service.security.SecurityTokenService
- All Implemented Interfaces:
ISecurityTokenService
@ApplicationScoped
public class SecurityTokenService
extends Object
implements ISecurityTokenService
This class provides a security service for getting and verify tokens
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic ISecurityTokenServiceDeprecated, for removal: This API element is subject to removal in a future version.return a security tokenbooleanverify if the request contains the securiy token
-
Field Details
-
MARK_TOKEN
- See Also:
-
PARAMETER_TOKEN
- See Also:
-
-
Method Details
-
getInstance
Deprecated, for removal: This API element is subject to removal in a future version.Use@Injectto obtain theSecurityTokenServiceinstance. This method will be removed in future versions.Returns the unique instance of theSecurityTokenServiceservice.This method is deprecated and is provided for backward compatibility only. For new code, use dependency injection with
@Injectto obtain theSecurityTokenServiceinstance instead.- Returns:
- The unique instance of
SecurityTokenService.
-
getToken
return a security token- Specified by:
getTokenin interfaceISecurityTokenService- Parameters:
request- The Http requeststrAction- the action type- Returns:
- a security token
-
validate
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
-
@Injectto obtain theSecurityTokenServiceinstance.