Message Boards

Append request parameters to logout page

avasek atok, modified 9 Years ago.

Append request parameters to logout page

Junior Member Posts: 41 Join Date: 1/9/15 Recent Posts
Hi,

I have two applications created as two portal instances in liferay, now i have to logout the first application to a URL. I tried with a parameter "default.logout.page.path" in portal-ext.properties. I am having the following issues
1) How can I have individaul logout URL's for each of the instance
2)Also how will i be able to pass request parameters to the logout URL

All i have done is
1)Created a link <a href="/c/portal/logout">LogOut</a> in both the appplications/instances
2)Created logout hook for invalidating liferay user session and clearing liferay cookies
3)Configured parameter "default.logout.page.path" in portal-ext.properties

Now i have to restrict my second application(second portal intance) upon logout to use a different redirect url

Any suggestions here, please help
thumbnail
Miroslav Ligas, modified 9 Years ago.

RE: Append request parameters to logout page

Regular Member Posts: 152 Join Date: 7/29/14 Recent Posts
What are you trying to achieve? With instances do you mean the Liferay instance that is configured in the server section in control panel?
avasek atok, modified 9 Years ago.

RE: Append request parameters to logout page

Junior Member Posts: 41 Join Date: 1/9/15 Recent Posts
Yes - I have two applications, which are created as two portal instances in liferay (ControlPanel ---> Server ---> Portal instances).

I configured logout page(default.logout.page.path) in portal-ext.properties. Since both the portal instances are configured on the same liferay tomact i am not able to define sepearte logout redirects for both the applications seperately.
Meaning application1 -- default.logout.page.path.1 = <url1>
application2 -- default.logout.page.path.2 = <url2>

Is there a way we can acheive this. Please suggest

Also i want to pass request parameters to those logout url's, how can i acheive. Does liferay supports in any way to acheive this. Please suggest
thumbnail
Miroslav Ligas, modified 9 Years ago.

RE: Append request parameters to logout page

Regular Member Posts: 152 Join Date: 7/29/14 Recent Posts
There is a way how to have an instance specific configuration.

#
# Each portal instance can have its own overriden property file following
# the convention portal-companyWebId.properties. To enable this feature, set
# the "company-id-properties" system property to true.
#
# To enable:
#
# java ... -Dcompany-id-properties=true
#
# The read order will now be: portal.properties, then portal-ext.properties,
# and then portal-liferay.com.properties.
#
# Note that not all properties can have different values per company. This
# functionality is only available for legacy reasons. The preferred way to
# configure a portal instance is through the Control Panel.
#
include-and-override=portal-${easyconf:companyId}.properties


But they may be issues with it. You need to test it.
https://www.liferay.com/community/forums/-/message_boards/message/26576213

To the parameters. They can be passed to the portal but you need to have means to process them before they get lost in some redirects.

EDIT:
You can set the default logout page trough the UI so the setting would be instance specific. Control Panel>Portal Settings> Default Logout Page
avasek atok, modified 9 Years ago.

RE: Append request parameters to logout page

Junior Member Posts: 41 Join Date: 1/9/15 Recent Posts
Is there any way i can pass the request parameters to the configured logout page. I have to pass a request parameter to the logout page, i am finding no way to get this done. Any suggestions

Thanks,
Kesava.
thumbnail
Miroslav Ligas, modified 9 Years ago.

RE: Append request parameters to logout page

Regular Member Posts: 152 Join Date: 7/29/14 Recent Posts
Not out of the box.

Have a look at logout.events.post and logout.events.pre actions. And also have a look at DefaultLogoutPageAction.