4 Replies Latest reply on Apr 5, 2013 2:56 PM by thospfuller

    Seam 2.2.2 and loggedIn.seam -- where is this coming from?

    thospfuller

      Hi Folks,

       

      We've inherited a web application which is based on Seam 2.2.2 (amongst other frameworks) and the first step was trying to sort out the SSO authentication/authorization. Well we sorted this today however now when the user passes authentication/authorization successfully I get a 404 / page not found for loggedIn.seam.

       

      I don't see any reference to loggedIn.{xhtml, .seam, or otherwise} in this application and so I'm trying to find out why the user is being sent here.

       

      I suspect if we sort this out then the app should run properly, so any recommendations would be very helpful (I've tested the application with security disabled and it works).

       

      Any thoughts?

       

      Thanks,

       

      Tom

        • 1. Re: Seam 2.2.2 and loggedIn.seam -- where is this coming from?
          tremes

          Hi Thomas!

          I guess that the action from org.jboss.seam.security.Identity.login() is called and this action returns "loggedIn" if user is successfully authenticated. So if you don't specify any additional navigation rule, you will be routed to page with the same name. 

          • 2. Re: Seam 2.2.2 and loggedIn.seam -- where is this coming from?
            thospfuller

            Thanks for your response.

             

            I'm comparing the pages.xml file with the same from an earlier, working, version of this application and there's no mention of loggedIn. The pages.xml file has the following:

             

                <page view-id="/*" action="#{identity.login}">
                    <navigation>
                        <rule if-outcome="home">
                            <redirect view-id="/home.xhtml"/>
                        </rule>
                    </navigation>
                </page>

            and the login process works fine.

             

            I've tried adding:

             

               <page view-id="/*" action="#{identity.login}">
                    <navigation>
                        <rule if="#{identity.loggedIn}">
                            <redirect view-id="/home.xhtml"/>
                        </rule>
                    </navigation>
                </page>

             

            However all I get then is a loop, where the app appears to keep requesting home.

             

            Tom

            • 3. Re: Seam 2.2.2 and loggedIn.seam -- where is this coming from?
              tremes

              Since you are executing #{identity.login} on every page and you are authenticated (#{identity.loggedIn} is true), you really keep requesting your home.xhtml. I guess that you want something like:

               

              ....

              <navigation from-action="#{identity.login}">

                    <rule if="#{identity.loggedIn}">

                       <redirect view-id="/home.xhtml"/>

                    </rule>

              </navigation>

              ....

              1 of 1 people found this helpful
              • 4. Re: Seam 2.2.2 and loggedIn.seam -- where is this coming from?
                thospfuller

                Hi Tomas

                 

                Pretty close.

                 

                Thanks for your help,

                 

                Tom