Ignore:
Timestamp:
04/29/19 15:07:44 (5 years ago)
Author:
bln4
Message:

Update to change password functionality, mostly cosmetic frame update.

Location:
trunk/src/org/expeditee/auth
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/auth/Actions.java

    r1334 r1335  
    3838import org.expeditee.auth.account.Authenticate.AuthenticationResult;
    3939import org.expeditee.auth.account.Create;
     40import org.expeditee.auth.account.Password;
    4041import org.expeditee.auth.gui.MailBay;
    4142import org.expeditee.auth.tags.AuthenticationTag;
     
    241242                                } else {
    242243                                        userData.put(AuthenticationTag.Username, UserSettings.UserName.get());
    243                                         changePassword(userData);
     244                                        Password.changePassword(userData);
    244245                                }
    245246                        } else {
     
    426427        }
    427428       
    428         /*
    429          * Changes the recorded password for a user in the key store.
    430          */
    431         private static void changePassword(final Map<AuthenticationTag, String> userdata) throws NoSuchAlgorithmException, KeyStoreException, FileNotFoundException, CertificateException, IOException, ClassNotFoundException, SQLException {
    432                 final String username = userdata.get(AuthenticationTag.Username);
    433                 final String password = userdata.get(AuthenticationTag.Password);
    434                 final String newpassword = userdata.get(AuthenticationTag.NewPassword);
    435 
    436                 final SecretKey key = AuthenticatorBrowser.getInstance().getSecretKey(username, password);
    437                 if (key == null) {
    438                         MessageBay.errorMessage("The username + existing password combination was incorrect.");
    439                 } else {
    440                         AuthenticatorBrowser.getInstance().putKey(username, newpassword, key);
    441                         MessageBay.displayMessage("Password changed successfully.");
    442                 }
    443         }
    444 
    445429//                      // establish properties
    446430//                      final String from = "[email protected]";
Note: See TracChangeset for help on using the changeset viewer.