Forums de discussion
Calling the auto login hook for every request
Sid L, modifié il y a 13 années.
Calling the auto login hook for every request
Junior Member Publications: 28 Date d'inscription: 03/12/10 Publications récentes
I want the auto login hook to be called for each and every request whether the user is logged in or not. Any idea how this can be achieved?
Minhchau Dang, modifié il y a 13 années.
RE: Calling the auto login hook for every request (Réponse)
Liferay Master Publications: 598 Date d'inscription: 22/10/07 Publications récentesSid L:
I want the auto login hook to be called for each and every request whether the user is logged in or not. Any idea how this can be achieved?
Auto login hooks only run for unauthenticated users.
If what you're trying to do is something similar to setting session attributes which change with every request, you could potentially define a login hook (which handles the logic for authenticating the user) and a service pre action (which handles the logic for when a user is authenticated) that use similar logic.
However, if what you're trying to do is unauthenticate/reauthenticate users with every request, I would recommend writing a servlet filter rather than use the auto login hook mechanism (only possible in an ext plugin).