@ Override public void changePassword ( String username , String password ) throws AuthenticationException { String user = file_store . getProperty ( username ) ; if ( user == null ) { throw new AuthenticationException ( "User '" + username + "' not found." ) ; } // Encrypt the new password String ePwd = encryptPassword ( password ) ; file_store . put ( username , ePwd ) ; try { saveUsers ( ) ; } catch ( IOException e ) { throw new AuthenticationException ( "Error changing password: " , e ) ; } }
Change a user s password .