Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-19992

Add the login page in Server distribution and handle redirection depending on installed UI packages

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WEBUI-0.8.0, 8.10
    • Component/s: Login Page
    • Upgrade notes:
      Hide

      Removed NuxeoAuthenticationFilter#DEFAULT_START_PAGE, use LoginScreenHelper.getStartupPagePath() instead.
      Added:

      • StartupPageServlet bound to /startup
      • LoginScreenHelper#getStartupPageURL(HttpServletRequest)
      • LoginScreenHelper#getStartupPagePath()
      • <startupPages> to <loginScreenConfig>, see LoginScreenConfig
      Show
      Removed NuxeoAuthenticationFilter#DEFAULT_START_PAGE, use LoginScreenHelper.getStartupPagePath() instead. Added: StartupPageServlet bound to /startup LoginScreenHelper#getStartupPageURL(HttpServletRequest) LoginScreenHelper#getStartupPagePath() <startupPages> to <loginScreenConfig>, see LoginScreenConfig
    • Sprint:
      nxFG 8.3.6, nxFG 8.4.1, nxfit 8.4.3, nxfit 8.4.4
    • Story Points:
      3

      Description

      Principle

      We now have an "agnostic" login page inside the nuxeo-server distribution.
      It handles form authentication and redirection logic depending on the UI package(s) installed:

      • No packages: redirect to home.html.
      • nuxeo-jsf-ui: redirect to the JSF UI (nxstartup.faces).
      • nuxeo-web-ui: redirect to the new Web UI (ui/).
      • nuxeo-jsf-ui and nuxeo-web-ui: redirect to the new Web UI (ui/). This behavior can be overridden to force redirection to the JSF UI, see below.

      Implementation

      To achieve this we mostly needed to:

      • Move the login related resources from bundles embedded in the nuxeo-jsf-ui package to the nuxeo-platform-web-common bundle included in the nuxeo-server distribution.
      • Make login.jsp post to a StartupPageServlet handling the startup page logic, so action="nxstartup.faces" became action="startup".

      Note that the workaround for NXP-20013 was removed.

      The startup page logic is configured by the "loginScreen" extension point, to which each UI package contributes:

      nuxeo-jsf-ui:

      <extension target="org.nuxeo.ecm.platform.ui.web.auth.service.PluggableAuthenticationService" point="loginScreen">
        <loginScreenConfig>
          <startupPages>
            <startupPage id="jsf" priority="10">
              <path>nxstartup.faces</path>
            </startupPage>
          </startupPages>
        </loginScreenConfig>
      </extension>
      

      nuxeo-web-ui

      <extension target="org.nuxeo.ecm.platform.ui.web.auth.service.PluggableAuthenticationService" point="loginScreen">
        <loginScreenConfig>
          <startupPages>
            <startupPage id="web" priority="100">
              <path>ui/</path>
            </startupPage>
          </startupPages>
        </loginScreenConfig>
      </extension>
      

      The startupPage contribution with the highest priority wins, so "web" by default.
      This can be overridden by:

      <extension target="org.nuxeo.ecm.platform.ui.web.auth.service.PluggableAuthenticationService" point="loginScreen">
        <loginScreenConfig>
          <startupPages>
            <startupPage id="jsf" order="1000" />
          </startupPages>
        </loginScreenConfig>
      </extension>
      

      If there are no startupPage contributions Nuxeo redirects to the static page home.html.

      See related documentation: https://doc.nuxeo.com/x/Y4rjAQ.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: