Is it possible to call an external webservice when user logs out?Is it possible to call an external webservice when user logs out?https://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785333&threadId=1081953782024-03-29T07:35:53Z2024-03-29T07:35:53ZRE: Is it possible to call an external webservice when user logs out?David H Nebingerhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1083640342018-05-16T12:55:56Z2018-05-16T12:55:56ZSame way as how you would invoke the external web service from anywhere.David H Nebinger2018-05-16T12:55:56ZRE: Is it possible to call an external webservice when user logs out?wendy tanhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1083605742018-05-16T11:45:29Z2018-05-16T11:45:29ZHow do I invoke an external web service from the pre logout action?wendy tan2018-05-16T11:45:29ZRE: Is it possible to call an external webservice when user logs out?David H Nebingerhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1083382642018-05-16T03:01:32Z2018-05-16T03:01:32ZWhen the user clicks the "logout" link, Liferay will go through a regular logout process.<br /><br />First the pre logout actions are invoked.<br /><br />Then Liferay will do its own logout handling for session destruction, etc.<br /><br />If using some form of SSO such as CAS, a token-based SSO like SiteMinder, etc., these will typically have some sort of "logout redirect link" that Liferay will invoke.<br /><br />Lastly, if possible, the post logout actions are invoked (assuming the user wasn't redirected somewhere else).<br /><br /><blockquote>Don’t quite get the idea that user may not be logged out.</blockquote><br /><br />Note how above I start with "When the user clicks the logout link..."<br /><br />If I don't click the link, I just close the browser? Well this is not a click on the link.<br /><br />In this scenario Liferay will terminate my HTTP session, but it cannot do a redirect to the external SSO systems, etc. It is up to those systems to, for example, expire the CAS token or whatever to end their SSO session details.<br /><br />For your own invocation of a web service, being able to invoke it may depend upon whether user is clicking on logout link or on Liferay session expire. Picking one or the other could mean you are not invoked (for the logout link) or you don't have current user data (if session expires after 30 mins of inactivity).David H Nebinger2018-05-16T03:01:32ZRE: Is it possible to call an external webservice when user logs out?wendy tanhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1083329472018-05-16T00:20:12Z2018-05-16T00:20:12ZCan I know when the pre log out action be triggered. Don’t quite get the idea that user may not be logged out.<br /><br />Could I know where can I create a pre log out action?<br /><br />Sorry to trouble u cos I am new to liferay.wendy tan2018-05-16T00:20:12ZRE: Is it possible to call an external webservice when user logs out?David H Nebingerhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1082026992018-05-13T15:46:45Z2018-05-13T15:46:45ZYes, with caveats.<br /><br />You can create a "pre logout action" to do whatever you want.<br /><br />The challenge is that if a user doesn't log out (i.e. they lose cell coverage, they just close their browser, their OS crashes, the browser locks up, etc) the pre logout action will not get invoked.David H Nebinger2018-05-13T15:46:45ZIs it possible to call an external webservice when user logs out?wendy tanhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1081