Remember Me Feature
Platform supports the Remember Me feature so that users can log on to the application without the need to provide their credentials every time they access it.
Platform uses a cookie-based login token (LoginToken) to authenticate users whose credentials have been stored by the Remember Me feature. The token uses the CoreRememberMeService class that implements the Spring RememberMeServices class interface.
Enhanced Login Token Generation
Using cookie-based login tokens has been enhanced as the following information is added to their value:
- their TTL (Time to Live) timestamps that are further verified on the server side. If the value of the timestamp has expired, the user isn't authenticated.
- a randomly generated salt that is used for password rehashing.
- a randomly generated value that is stored in the database for each user
The randomly generated value can be revoked. As a result of such revocation, all cookie-based login tokens generated for users become invalid and users can't be authenticated through the old token. To revoke user tokens, use the de.hybris.platform.jalo.user.TokenService interface and the dedicated revokeTokenForUser(final String userId) method. The default implementation (DefaultTokenService) replaces random values with new ones.
If you want to turn off the default behavior of the enhanced login token generation, add the following property to your local.properties file:
login.token.extended=false
Accepting Login Tokens as URL Parameters
Login tokens aren't accepted as URL parameters. However, if you want to enable such login tokens, add the following property to your local.properties file:
login.token.url.enabled=true
Disabling Authentication Through Login Tokens
You can disable authentication through login tokens by adding the following property to your local.properties file:
login.token.authentication.enabled=false
If you want to disable login token authentication for given web applications, use the login.token.authentication.[extensionName].enabled=false property, for example:
login.token.authentication.backoffice.enabled
If the property is not set for given web applications, the value of the login.token.authentication.enabled is used. See an example of a setting that enables authentication with login tokens for Backoffice and disables it for Administration Console:
login.token.authentication.hac.enabled=false login.token.authentication.backoffice.enabled=true login.token.authentication.enabled=false