Project

General

Profile

Customizing the Web Client Sign-In Page

Front-End

The web driver pages (login, logout, client) live in an <iframe> controlled by the FWD framework to allow a fixed environment for certain web features. The container is invisible without ui elements, but provides certain JavaScript functionalities. The contract with the iframe container and the server (the exposed endpoints) is maintained by the script in fwd_sdk.js. It should be included in a custom login page in the following way:

<head>
   <script type="text/javascript" src="/webres/fwd_sdk.js"></script>
</head>
<body>
<script>
   fwdSdk.initialize();
</script>
</body>

The contract between the html and the sdk is through element ids: #user-input, #password-input, #theme-select, #theme-row (the container for the UI theme select), #login-button, #login-error. If the login page is replaced with a custom one and the customer decides to use different selectors, they can be listed as arguments in the call to initialize.

Editing or customizing fwd_sdk.js is not supported. If changes are needed in that code, contact Golden Code. fwd_sdk.js is intended to be an API forming a contract with the larger system. Any changes to that can destabilize the system or create security issues. Any installation with a customized fwd_sdk.js will not be eligible for support.

Default resource files are provided for the login (served by GET /gui, GET /chui, GET /embedded) and logout screen (served by GET /gui/logout, GET /chui/logout). Embedded as of now doesn't have a logout screen, because this is not part of its flow. Any of the default web resources web_partial_login.html, web_logout.html, styles.css, logo.png, favicon.ico can be easily replaced by being placed in the customer's build root webres/ directory, that should be included by the build script for the custom jar. The the dir should end up in the root package defined in directory as runtime/default/legacy-system/pkgroot.

Example addition to the custom jar build script:

   <target name="prepare">

     [...]

      <!-- copy base web res dir -->
      <copy todir="${build.home}/classes/${pkgroot}">
         <fileset dir="${p2j.home}">
            <include name="webres/**"/>
         </fileset>
      </copy>

     [...]
   </target>

Other custom resources can be added as well to the same folder and they will be served under /webres by the same web handler without additional configurations.

Since the login page is served in an <iframe> controlled by the FWD framework, the page title can be changed only with directory configs: webClient/loginPageTitle.

More about SSO login page at Single_Sign_On.