This method, added to the SubjectQueries interface, allows users to change their password after it expires:
boolean changePassword(String username, String oldPassword, String newPassword) throws RemoteException, SMException
To call changePassword, users need not be authenticated; they need only to supply their user name, old password, and new password. You can call this method to change an expired password for a limited period of time after the password expires. To configure this time period, use Enterprise Security Manager—see “Configuring password properties for a security domain”.
If case of a failed authentication attempt, you can call the PortalSession::getAuthenticationFailureCode method, which returns a String that describes the reason for the failure. The authentication failure code persists with the unauthenticated session for the life of the session, but is overwritten by future authentication attempts on the same PortalSession instance. A new failure code indicates that a password has expired but the user still has the opportunity to change the password using the changePassword method. The failure codes are defined in the com.sybase.ep.security.sessionsvcs.AuthenticationFailureReasons interface, which is documented in Javadoc. Open a browser and access docs/html/index.html in your Enterprise Security installation