2
votes

Want develop one simple web application (Plack/PSGI based). The application should be allowed to run only for authenticated users via the Liferay system. Looking for any hints/help for the next questions:

The currect Liferay (Liferay Portal Community Edition 6.1.1) is installed on Apache-Coyote/1.1. (I know nearly nothing about Java, wars, portlets and other liferay things :().

  • Need i create another virtual host?
  • or the Apache/Coyote can act as reverse proxy (so will forward any request coming to http://liferay.example.com/perlapp/* to my Plack application (what will run on another port e.g. 5000?) (requests should allow file uploads and so on).

And the main programming questions are:

  • How to use the Liferay authentication system - from the perl?

  • Is (possible/or must) to call LifeRay, or (I can/should) use some standard perl module with direct connection to some "Liferay user-database"?. (preferably with some Plack::Middleware::Auth::.*)?

  • The simplest would be for me - idea - if the Apache/Coyote can act as a reverse proxy, is possible to do all authentication on the Coyote/Liferay level and my plack-web-app doesn't need care about the authentication? Is this possible?

1

1 Answers

1
votes

I would go with the standard portlet way of creating application for liferay portal, but if you must (wont) use perl I would try to connet the tomcat to the shame identity provider as liferay. For example a LDAP.

How to use the Liferay authentication system - from the perl?

From perl you could user liferay web services to access the permission checking mechanism.

Is (possible/or must) to call LifeRay, or (I can/should) use some standard perl module with direct connection to some "Liferay user-database"?. (preferably with some Plack::Middleware::Auth::.*)?

Use web services, don't access the database directly.

To approach the problem from other side. You could create an private site on liferay. Create an empty theme for the side and place there the IFrame portlet. You could show your app in the IFrame. You could modify the IFrame portlet to share user auth data with the contained app.