4 Replies Latest reply: Mar 5, 2013 8:54 AM by user5636757 Branched to a new discussion. RSS

    login - navigation logic is not working

    user5636757
      hi,

      i have following configuration in my faces-config.xml file:

      <navigation-rule>
      <from-view-id>/login</from-view-id>
      <navigation-case>
      <from-outcome>login_success</from-outcome>
      <to-view-id>/home</to-view-id>
      <redirect/>
      </navigation-case>
      <navigation-case>
      <from-outcome>logout_success</from-outcome>
      <to-view-id>/login</to-view-id>
      <redirect/>
      </navigation-case>
      </navigation-rule>



      in pages.xml file, i have made login page available to only anonymous users and home page is available to only authenticated users.

      however it looks like my navigation logic is not being referred.

      after login also i see login page (same page) - how to change this default behavior.

      also ideally login page shouldn't be available to authenticated user as per my configuration, and i should get 404 error, any reason for this?

      please suggest.

      thanks.

      Edited by: user5636757 on Feb 27, 2013 8:31 AM
        • 1. Re: login - navigation logic is not working
          Daniel Merchán
          Hi.

          WebCenter Portal Framework sometimes have conflicts with ADF Security and the navigation between pages and come back to login page.

          Before to provide you a workaround about it. I need more information.

          1) Your default-navigation-model is based in Page Hierarchhy or page links?.
          2) Login page shouldn't be in pages.xml (because you are securing a login page).

          Regards.
          • 2. Re: login - navigation logic is not working
            user5636757
            Daniel Merchán wrote:
            Hi.

            WebCenter Portal Framework sometimes have conflicts with ADF Security and the navigation between pages and come back to login page.

            Before to provide you a workaround about it. I need more information.

            1) Your default-navigation-model is based in Page Hierarchhy or page links?.
            2) Login page shouldn't be in pages.xml (because you are securing a login page).

            Regards.
            thanks Daniel.

            default-navigation-model is based on page links (individual pages are added in it).
            pages.xml is only used for securing pages.

            i wanted login page not to be accessed by authenticated user so i placed that and enable anonymous user and admin user only... but still it's available to logged in users.
            • 3. Re: login - navigation logic is not working
              Daniel Merchán
              Hi.

              If you are using PrettyUrl for redirections (login/logout) i recommend you read 11.1.1.6.4 patch.

              However I usually setup my default webcenter portal with next config:

              index.html
              <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
              <html>
                <head>
                  <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"></meta>
                  <meta http-equiv="refresh" content="0;url=./faces/oracle/webcenter/portalapp/pages/home.jspx" />
                  <title>Portal Home</title>
                </head>
                <body></body>
              </html>
              faces-config.xml
              <navigation-rule>
                  <from-view-id>*</from-view-id>
                  <navigation-case>
                    <from-outcome>login_success</from-outcome>
                    <to-view-id>/oracle/webcenter/portalapp/pages/home.jspx</to-view-id> <!-- You can use externalId to be login sucess configurable in runtime -->
                    <redirect/>
                  </navigation-case>
                  <navigation-case>
                    <from-outcome>logout_success</from-outcome>
                    <to-view-id>/adfAuthentication?logout=true&amp;end_url=./faces/oracle/webcenter/portalapp/pages/login.jspx</to-view-id> 
              <!-- Or directly /oracle/webcenter/portalapp/pages/login.jspx , I prefer to logout for SSO solutions -->
                    <redirect/>
                  </navigation-case>
                </navigation-rule>
              With /oracle/... paths you are forcing to reapply the security. With PrettyURL i face some issues in some projects. Installing 11.1.1.6.4 patch I think that you can use PrettyURL for the redirections :).

              I hope this help you.

              Regards.
              • 4. Re: login - navigation logic is not working
                user5636757
                thanks Daniel.
                it worked, post login it's going to home page...


                however login page is still visible... my security rules are not applied it seems which i have in pages.xml file.