掲示板

login post and logout pre hook in mobile sdk

thumbnail
8年前 に Chirag M Gurav によって更新されました。

login post and logout pre hook in mobile sdk

Junior Member 投稿: 34 参加年月日: 13/01/04 最新の投稿
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
8年前 に Tomas Polesovsky によって更新されました。

RE: login post and logout pre hook in mobile sdk

Liferay Master 投稿: 676 参加年月日: 09/02/13 最新の投稿
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.
8年前 に Muhammad Azeem によって更新されました。

RE: login post and logout pre hook in mobile sdk

New Member 投稿: 16 参加年月日: 15/01/14 最新の投稿
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.