Technical details

Overview

The project hosts three submodules – html2jsr286, caterpillar and lportal.

Technical overview

Session cookies

html2jsr286 does support session cookies. Sessions from the browser are identified by Liferay, and Rails session cookies are maintained between reloads. The session cookies are never stored to the client browser, but to the Liferay database. You can use cookies in your application like you would do without the Liferay container.

Liferay variables

User ID (UID) and group ID (GID) are passed from Liferay to Rails in a session cookie. Caterpillar contains filters to retrieve these values to the Rails controller. Please refer to the LiferayController in portlet test bench sources for their usage.

Security

To protect Rails server from accepting requests that are not coming from the Liferay container, the Rails server and a portlet have a shared secret that is passed in a cookie with each request. A new secret is generated when the caterpillar generator is run, and is stored to config/portlets.rb. Please refer to Caterpillar README and LiferayController for its usage.