voyent
Session initialization  XML
Forum Index -> Portals & Portlets
Author Message
kdean

Joined: 12/May/2009 00:00:00
Messages: 37
Offline


I'm having a problem with session initialization in Liferay 5.2.1.

We have two separate applications bundled in two separate WARs.

The way our portal is setup, we supply a single portlet from WAR #1 on the default public page (/web/guest/home) to non-authenticated users. Users login through this portlet (we don't use the Liferay login) and as a side effect of this login we do some fancy redirects to WAR #2 to let that application know that the user has logged in (we're using SAML 2.0 identity federation to pass around user information to keep things loosely coupled).

Unfortunately, nothing in WAR #2 will now work, perhaps because the session for WAR #2 was created outside of the context of ICEfaces and Liferay. If we put a dummy portlet for WAR #2 on the public page prior to login, everything works fine after that.

In short, this works:

  • portlets from WARs #1 and #2 on public page
  • user enters public page
  • Liferay session gets created for user
  • WAR #1 session gets created for user
  • WAR #2 session gets created for user
  • user logs in via portlet for WAR #1
  • portlet forces redirect to servlet in WAR #1 (its own WAR) outside of Liferay
  • servlet for WAR #1 redirects to servlet in WAR #2 outside of Liferay
  • servlet in WAR #2 does its necessary work and redirects back to servlet in WAR #1
  • servlet in WAR #1 redirects back to Liferay root
  • Liferay takes over and directs user to personalized authenticated page, which contains portlets from WARs #1 and #2

    This doesn't work:

  • portlet from WAR #1 only on public page
  • user enters public page
  • Liferay session gets created for user
  • WAR #1 session gets created for user
  • user logs in via portlet for WAR #1
  • portlet forces redirect to servlet in WAR #1 (its own WAR) outside of Liferay
  • servlet for WAR #1 redirects to servlet in WAR #2 outside of Liferay
  • WAR #2 session gets created for user
  • servlet in WAR #2 does its necessary work and redirects back to servlet in WAR #1
  • servlet in WAR #1 redirects back to Liferay root
  • Liferay takes over and directs user to personalized authenticated page, which contains portlets from WARs #1 and #2

    Note the change in position of where session for WAR #2 gets created.

    Is there something in ICEfaces like this:

    Code:
     if (session.isNew()) {
         // Do some ICEfaces session initialization here.
     }
     


    If so, that would explain the behaviour we're seeing.
  •  
    Forum Index -> Portals & Portlets
    Go to:   
    Powered by JForum 2.1.7ice © JForum Team