Forums de discussion

login post and logout pre hook in mobile sdk

thumbnail
Chirag M Gurav, modifié il y a 8 années.

login post and logout pre hook in mobile sdk

Junior Member Publications: 34 Date d'inscription: 04/01/13 Publications récentes
Hello everyone,
i have created one hook for capture login post and logout pre event hook and its its working in web , but from mobile application when user login or logout same event not able to capture, means from web hook is called and working but from app ( which is using mobile sdk android) not working,

Is there any way to capture login and logout event same like web instead of calling web service after the login or before the logout.


Thanks,
thumbnail
Tomas Polesovsky, modifié il y a 8 années.

RE: login post and logout pre hook in mobile sdk

Liferay Master Publications: 676 Date d'inscription: 13/02/09 Publications récentes
Hi,

from my experience mobile applications use remote JSONWS API. This API is stateless, that means no session is used, each request must be authenticated/authorized.

Default Liferay instance offers only HTTP Basic / Digest authentication which doesn't track any session, there is no login / logout.

Solution would be to implement a custom (probably a token based) authentication with session tokens. There it would be possible to track the session token creation and expiration.
Muhammad Azeem, modifié il y a 8 années.

RE: login post and logout pre hook in mobile sdk

New Member Publications: 16 Date d'inscription: 14/01/15 Publications récentes
Chirag M Gurav:
Hello everyone,
i have created one hook for capture login post and logout pre event hook and its its working in web , but from mobile application when user login or logout same event not able to capture, means from web hook is called and working but from app ( which is using mobile sdk android) not working,

Is there any way to capture login and logout event same like web instead of calling web service after the login or before the logout.


Thanks,



Hi,
Have you find some solution for your problem? Actually I am facing the similar kind of problem, I want to have one user with one session. I have achived it on web by setting the properties in portal-ext.properties but when the user is loggedin from the android application using the login screenlet, the same user from the web does not loggedout, as android application do not have state or maintain session.