Hiding password characters

You can configure Mobile Portal Accelerator such that password characters are hidden in applications.

How to determine what type of authentication you are using

By default, passwords appear in the clear when entered. Because many mobile applications do not rely on password authentication, and because entering text on mobile devices is not always easy, many service providers support password entry in the clear. Depending on your configuration settings, you can modify either the Login.jsp or the LoginView.jsp (Mobile Login portlet) to hide the password as it is typed in the login fields.

To determine which file you will need to edit, check the value for the custom property authentication.screen.login in the Resource Environment Providers list (found in the WebSphere® Application Server Integrated Solutions Console).

Updating the Login.jsp

The Login.jsp file is located in the wp_profile_root/installedApps/node_name/MPATheme.ear/MPATheme.war/screens/xdime directory.

To change the password display to hide the password characters as they are typed, add a type attribute to the xftextinput element as shown in the following example.

Change:
<xftextinput name="password" entryPane="FI_1" maxLength="20" 
   captionPane="FT_1" caption='<wps:text key="password" bundle="nls.field"/>'/>
to:
<xftextinput name="password" entryPane="FI_1" maxLength="20" type="password"
   captionPane="FT_1" caption='<wps:text key="password" bundle="nls.field"/>'/>

Updating the LoginView.jsp (Mobile Login portlet)

The Mobile Login portlet is located in the wp_profile_root/installedApps/node_name/PA_MWPLogin.ear/MWPLogin.war directory.
Follow these steps to change the password display to hide the password characters as they are typed:
  1. Change to the /installableApps/ directory and extract WEB-INF/jsp/xdime/LoginView.jsp from the PA_MWPLogin.war file using the following command:
    jar -xvf PA_MWPLogin.war WEB-INF/jsp/xdime/LoginView.jsp
  2. To change the password display to hide the password characters as they are typed, add a type attribute to the xftextinput element as shown in the following example.
    Change:
    <xftextinput name="<%=Login.PASSWORD_FIELD_ID%>" entryPane="FI.1" maxLength="20"
       captionPane="FT.1" caption='<fmt:message key="login.label.password"/>'/>
    to:
    <xftextinput name="<%=Login.PASSWORD_FIELD_ID%>" entryPane="FI.1" maxLength="20" type="password"
       captionPane="FT.1" caption='<fmt:message key="login.label.password"/>'/>
  3. Update the PA_MWPLogin.war with the updated WEB-INF/jsp/xdime/LoginView.jsp using the following command:
    jar -uvf PA_MWPLogin.war WEB-INF/jsp/xdime/LoginView.jsp
  4. Update the existing MWPLogin web module with the modified PA_MWPLogin.war using Administration > Portlet Management > Portlets.



Terms of use
(C) Copyright IBM Corporation 2012. All Rights Reserved.