![]() |
Sun Java System Identity Server 2004Q2 Sample |
Main Page > Console Sample Page Administration Console: Change User Password SamplePurposeBuild a user interface that allows a user to change their password. This is done by removing the Password and Password Confirmation text fields from current user profile page and adding a hyperlink to bring up a new window where the password can be modified.
Files1. UMChangeUserPasswordViewBean.java2. UMSuccessfullyChangedPasswordViewBean.java 3. model/UMChangeUserPasswordModel.java 4. model/UMChangeUserPasswordModelImpl.java 5. jsp/UMChangeUserPassword.jsp 6. jsp/UMSuccessfullyChangedPassword.jsp
Directions1. Copy all of the change user password JSP files to the web application.cp /opt/SUNWam/samples/console/ChangeUserPassword/jsp/* /opt/SUNWam/web-src/applications/console/user 2. Remove the password textfield from the User Profile. This is done by removing the display keyword from the any string for the userpassword attribute. The userpassword attribute is found in /etc/opt/SUNWam/config/xml/amUser.xml change <AttributeSchema name="userpassword"to <AttributeSchema name="userpassword" 3. Add a new attribute to the User service which will display a hyperlink in the User Profile page. Selecting this link will invoke the new password class, /amconsole/user/UMChangeUserPassword, where the password can be modified. Edit /etc/opt/SUNWam/config/xml/amUser.xml and add the following entry to the User subschema. <AttributeSchema name="ChangePassword" 4. Add the new resource strings to the User service properties file. Edit /opt/SUNWam/locale/amUser.properties and add the following: u1051=Password 5. Add the new resource strings for the new change password dialog. Edit /opt/SUNWam/locale/amAdminModuleMsgs.properties and add the following: changepassword.title=Change Password 6. Reload the User service. This needs to be done because the userpassword attribute was modified, and a new attribute was added to the service definition. Execute the following two commands to reload the service. /opt/SUNWam/bin/amadmin --runasdn <uid for amAdmin> --password <password> --deleteservice iPlanetAMUserService 7. Compile the Java files gmake all /opt/SUNWam/samples/console/ChangeUserPassword 8. Create a new jar with the sample class files cd /opt/SUNWam/samples/console 9. Copy the am_console_sample.jar into /opt/SUNWam/web-src/applications/WEB-INF/lib 10. Redeploy the console Set the DEPLOY_LEVEL to 22 in the silent file 11. Login to Console and view the User Profile page. Select the link
to open the user password page.
|