From daf1a2ee244795c937c7c2c4f41698dcfdeb96bd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 12 Jul 2017 21:30:17 +0200 Subject: [PATCH] Please cherry-pick: - imported from new package MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- lib/juser-login-core.jar | Bin 0 -> 28992 bytes lib/juser-login-lib.jar | Bin 0 -> 4532 bytes nbproject/project.properties | 6 +++++ nbproject/project.xml | 6 +++++ .../contact/PizzaContactWebSessionBean.java | 10 ++++---- .../PizzaLocalizationSessionBean.java | 4 +-- .../user/PizzaAdminUserWebRequestBean.java | 16 ++++++------ .../beans/user/PizzaUserWebSessionBean.java | 14 +++++----- .../PizzaConfirmationLinkWebRequestBean.java | 4 +-- .../PizzaEmailChangeWebSessionBean.java | 2 +- .../login/PizzaUserLoginWebSessionBean.java | 24 +++++++++--------- .../PizzaUserPasswordWebRequestBean.java | 12 ++++----- .../PizzaUserRegisterWebSessionBean.java | 14 +++++----- .../PizzaResendLinkWebSessionBean.java | 6 ++--- 14 files changed, 65 insertions(+), 53 deletions(-) create mode 100644 lib/juser-login-core.jar create mode 100644 lib/juser-login-lib.jar diff --git a/lib/juser-login-core.jar b/lib/juser-login-core.jar new file mode 100644 index 0000000000000000000000000000000000000000..be51922603bba21188144f56e2fb5bd097a66535 GIT binary patch literal 28992 zcmeHQ349#YdH>$(nAK_}S?fbaV0(Q^TCEP-@_k8`WLvf_BpEDonDuHbFP3)2?#kGJ zNl3}rq$vpmOi4({K|>C}1Y3rJLz0pvq)F2@N86;iXwn?CIhv%oAph^p%+AhUn)Mah zpQYdI%+9>|-uJ%yz4yJh{ksYZT|`czD?jp+os{%fLWR`RIn>tB)w`|f<&@~5}9FB%ArsowTT zbRrTB!~wjn%vI(xaZGJaA#jXDN1L*jDAP-f9|;}|gh$mJMXyLLdgEkFjgCb|L*ZZ~ zn(NJF)4UmsgyVrwSdHeW-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)w}}z&Ori;0jQN97TzVa511n`|VFBdu2qS>oXKmSr-brfXn3O zEuYvjm&ftuMi86~ZnQW?KJo?wp8Vv8**ZUF@ZK=i3=RA_KO|+)G(AUHEey#kUGvB~ z28W5!2Ehhr&dbT`IhetK7Oo$eTANF^afcfW<`bJZ_c?>tg}c_)gjqEV2lG@IsE_S$ z$A6u3lK#^RkCQa?AHtzw^w~fsS4}*V7{@&q1sr1V@!%$+Fkv^J4b?}->?s`qe@Bsu zjE-pdlp#vu+&I#a-WBKPTpu6$%hP2nS+YE3us~7d`+V?=6Ben>b(WbPIlHYv z4IGp3PnCXy&P6skJ=I}t4k^%h@oXONfoiDfQ7ukQh#a)|Z}>o8)dli>wjF~cvxf?gnix6AvhNb%$ ${file.reference.juser-lib.jar} + + ${file.reference.juser-login-core.jar} + + + ${file.reference.juser-login-lib.jar} + ${file.reference.jcustomer-core.jar} diff --git a/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaContactWebSessionBean.java b/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaContactWebSessionBean.java index 6b4d09ae..cec2b62d 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaContactWebSessionBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaContactWebSessionBean.java @@ -48,16 +48,16 @@ import org.mxchange.jphone.phonenumbers.landline.LandLineNumber; import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber; import org.mxchange.jphone.phonenumbers.mobile.MobileNumber; import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider; -import org.mxchange.jusercore.events.confirmation.ObservableUserConfirmedAccountEvent; -import org.mxchange.jusercore.events.login.ObservableUserLoggedInEvent; -import org.mxchange.jusercore.events.registration.ObservableUserRegisteredEvent; import org.mxchange.jusercore.events.user.add.ObservableAdminAddedUserEvent; import org.mxchange.jusercore.events.user.linked.ObservableAdminLinkedUserEvent; -import org.mxchange.jusercore.exceptions.UserPasswordMismatchException; import org.mxchange.jusercore.model.user.User; +import org.mxchange.juserlogincore.events.confirmation.ObservableUserConfirmedAccountEvent; +import org.mxchange.juserlogincore.events.login.ObservableUserLoggedInEvent; +import org.mxchange.juserlogincore.events.registration.ObservableUserRegisteredEvent; +import org.mxchange.juserlogincore.exceptions.UserPasswordMismatchException; import org.mxchange.pizzaapplication.beans.BasePizzaController; -import org.mxchange.pizzaapplication.beans.user.login.PizzaUserLoginWebSessionController; import org.mxchange.pizzaapplication.beans.user.PizzaUserWebSessionController; +import org.mxchange.pizzaapplication.beans.user.login.PizzaUserLoginWebSessionController; /** * A general contact bean (controller) diff --git a/src/java/org/mxchange/pizzaapplication/beans/localization/PizzaLocalizationSessionBean.java b/src/java/org/mxchange/pizzaapplication/beans/localization/PizzaLocalizationSessionBean.java index a1da4c48..b2ed2299 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/localization/PizzaLocalizationSessionBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/localization/PizzaLocalizationSessionBean.java @@ -23,8 +23,8 @@ import javax.enterprise.context.SessionScoped; import javax.enterprise.event.Observes; import javax.faces.context.FacesContext; import javax.inject.Named; -import org.mxchange.jusercore.events.login.ObservableUserLoggedInEvent; -import org.mxchange.jusercore.events.logout.ObservableUserLogoutEvent; +import org.mxchange.juserlogincore.events.login.ObservableUserLoggedInEvent; +import org.mxchange.juserlogincore.events.logout.ObservableUserLogoutEvent; import org.mxchange.pizzaapplication.beans.BasePizzaController; /** diff --git a/src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebRequestBean.java b/src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebRequestBean.java index c592b378..833eddd1 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebRequestBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/user/PizzaAdminUserWebRequestBean.java @@ -32,8 +32,6 @@ import javax.naming.InitialContext; import javax.naming.NamingException; import org.mxchange.jcontacts.contact.Contact; import org.mxchange.jcoreee.utils.FacesUtils; -import org.mxchange.jusercore.container.login.UserLoginContainer; -import org.mxchange.jusercore.events.registration.ObservableUserRegisteredEvent; import org.mxchange.jusercore.events.user.add.AdminAddedUserEvent; import org.mxchange.jusercore.events.user.add.ObservableAdminAddedUserEvent; import org.mxchange.jusercore.events.user.delete.AdminDeletedUserEvent; @@ -49,7 +47,6 @@ import org.mxchange.jusercore.events.user.update.ObservableAdminUpdatedUserDataE import org.mxchange.jusercore.exceptions.EmailAddressAlreadyRegisteredException; import org.mxchange.jusercore.exceptions.UserNameAlreadyRegisteredException; import org.mxchange.jusercore.exceptions.UserNotFoundException; -import org.mxchange.jusercore.exceptions.UserPasswordRepeatMismatchException; import org.mxchange.jusercore.exceptions.UserStatusConfirmedException; import org.mxchange.jusercore.exceptions.UserStatusLockedException; import org.mxchange.jusercore.exceptions.UserStatusUnconfirmedException; @@ -57,9 +54,12 @@ import org.mxchange.jusercore.model.user.AdminUserSessionBeanRemote; import org.mxchange.jusercore.model.user.LoginUser; import org.mxchange.jusercore.model.user.User; import org.mxchange.jusercore.model.user.UserSessionBeanRemote; -import org.mxchange.jusercore.model.user.UserUtils; import org.mxchange.jusercore.model.user.profilemodes.ProfileMode; import org.mxchange.jusercore.model.user.status.UserAccountStatus; +import org.mxchange.juserlogincore.container.login.UserLoginContainer; +import org.mxchange.juserlogincore.events.registration.ObservableUserRegisteredEvent; +import org.mxchange.juserlogincore.exceptions.UserPasswordRepeatMismatchException; +import org.mxchange.juserlogincore.login.UserLoginUtils; import org.mxchange.pizzaapplication.beans.BasePizzaController; import org.mxchange.pizzaapplication.beans.contact.PizzaAdminContactWebRequestController; import org.mxchange.pizzaapplication.beans.contact.PizzaContactWebSessionController; @@ -285,7 +285,7 @@ public class PizzaAdminUserWebRequestBean extends BasePizzaController implements return ""; //NOI18N } else if ((this.getUserPassword() == null && (this.getUserPasswordRepeat() == null)) || ((this.getUserPassword().isEmpty()) && (this.getUserPasswordRepeat().isEmpty()))) { // Empty password entered, then generate one - password = UserUtils.createRandomPassword(PizzaUserWebSessionController.MINIMUM_PASSWORD_LENGTH); + password = UserLoginUtils.createRandomPassword(PizzaUserWebSessionController.MINIMUM_PASSWORD_LENGTH); } else if (!this.isSamePasswordEntered()) { // Both passwords don't match throw new FaceletException(new UserPasswordRepeatMismatchException(user)); @@ -299,7 +299,7 @@ public class PizzaAdminUserWebRequestBean extends BasePizzaController implements assert (password.length() >= PizzaUserWebSessionController.MINIMUM_PASSWORD_LENGTH) : "Password is not long enough."; //NOI18N // Encrypt password and set it - user.setUserEncryptedPassword(UserUtils.encryptPassword(password)); + user.setUserEncryptedPassword(UserLoginUtils.encryptPassword(password)); try { // Now, that all is set, call EJB @@ -430,7 +430,7 @@ public class PizzaAdminUserWebRequestBean extends BasePizzaController implements return ""; //NOI18N } else if (this.isSamePasswordEntered()) { // Same password entered, create container - if ((Objects.equals(user.getUserMustChangePassword(), this.getUserMustChangePassword())) && (UserUtils.ifPasswordMatches(new UserLoginContainer(user, this.getUserPassword())))) { + if ((Objects.equals(user.getUserMustChangePassword(), this.getUserMustChangePassword())) && (UserLoginUtils.ifPasswordMatches(new UserLoginContainer(user, this.getUserPassword())))) { // Clear password fields this.setUserPassword(null); this.setUserPasswordRepeat(null); @@ -441,7 +441,7 @@ public class PizzaAdminUserWebRequestBean extends BasePizzaController implements } // Encrypt password - encryptedPassword = UserUtils.encryptPassword(this.getUserPassword()); + encryptedPassword = UserLoginUtils.encryptPassword(this.getUserPassword()); } // Set user name and flag diff --git a/src/java/org/mxchange/pizzaapplication/beans/user/PizzaUserWebSessionBean.java b/src/java/org/mxchange/pizzaapplication/beans/user/PizzaUserWebSessionBean.java index 72287e8a..b2d6c5d3 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/user/PizzaUserWebSessionBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/user/PizzaUserWebSessionBean.java @@ -33,26 +33,26 @@ import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; import org.mxchange.jcontacts.contact.Contact; -import org.mxchange.jusercore.events.confirmation.ObservableUserConfirmedAccountEvent; -import org.mxchange.jusercore.events.login.ObservableUserLoggedInEvent; -import org.mxchange.jusercore.events.registration.ObservableUserRegisteredEvent; import org.mxchange.jusercore.events.user.add.ObservableAdminAddedUserEvent; import org.mxchange.jusercore.events.user.delete.ObservableAdminDeletedUserEvent; import org.mxchange.jusercore.events.user.linked.ObservableAdminLinkedUserEvent; import org.mxchange.jusercore.events.user.locked.ObservableAdminLockedUserEvent; -import org.mxchange.jusercore.events.user.password_change.ObservableUpdatedUserPasswordEvent; import org.mxchange.jusercore.events.user.unlocked.ObservableAdminUnlockedUserEvent; import org.mxchange.jusercore.events.user.update.ObservableAdminUpdatedUserDataEvent; import org.mxchange.jusercore.events.user.update.ObservableUpdatedUserPersonalDataEvent; import org.mxchange.jusercore.events.user.update.UpdatedUserPersonalDataEvent; import org.mxchange.jusercore.exceptions.UserEmailAddressNotFoundException; import org.mxchange.jusercore.exceptions.UserNotFoundException; -import org.mxchange.jusercore.exceptions.UserPasswordMismatchException; import org.mxchange.jusercore.model.user.LoginUser; import org.mxchange.jusercore.model.user.User; import org.mxchange.jusercore.model.user.UserSessionBeanRemote; -import org.mxchange.jusercore.model.user.UserUtils; import org.mxchange.jusercore.model.user.profilemodes.ProfileMode; +import org.mxchange.juserlogincore.events.confirmation.ObservableUserConfirmedAccountEvent; +import org.mxchange.juserlogincore.events.login.ObservableUserLoggedInEvent; +import org.mxchange.juserlogincore.events.registration.ObservableUserRegisteredEvent; +import org.mxchange.juserlogincore.events.user.password_change.ObservableUpdatedUserPasswordEvent; +import org.mxchange.juserlogincore.exceptions.UserPasswordMismatchException; +import org.mxchange.juserlogincore.login.UserLoginUtils; import org.mxchange.pizzaapplication.beans.BasePizzaController; import org.mxchange.pizzaapplication.beans.contact.PizzaContactWebSessionController; import org.mxchange.pizzaapplication.beans.features.PizzaFeaturesWebApplicationController; @@ -519,7 +519,7 @@ public class PizzaUserWebSessionBean extends BasePizzaController implements Pizz this.setUserProfileMode(ProfileMode.INVISIBLE); // Generate random password - String randomPassword = UserUtils.createRandomPassword(PizzaUserWebSessionController.MINIMUM_PASSWORD_LENGTH); + String randomPassword = UserLoginUtils.createRandomPassword(PizzaUserWebSessionController.MINIMUM_PASSWORD_LENGTH); // Set random password this.setUserPassword(randomPassword); diff --git a/src/java/org/mxchange/pizzaapplication/beans/user/confirmlink/PizzaConfirmationLinkWebRequestBean.java b/src/java/org/mxchange/pizzaapplication/beans/user/confirmlink/PizzaConfirmationLinkWebRequestBean.java index 98b46a9a..08be2df6 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/user/confirmlink/PizzaConfirmationLinkWebRequestBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/user/confirmlink/PizzaConfirmationLinkWebRequestBean.java @@ -31,13 +31,13 @@ import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; import org.mxchange.jcoreee.utils.FacesUtils; -import org.mxchange.jusercore.events.confirmation.ObservableUserConfirmedAccountEvent; -import org.mxchange.jusercore.events.confirmation.UserConfirmedAccountEvent; import org.mxchange.jusercore.exceptions.UserStatusConfirmedException; import org.mxchange.jusercore.exceptions.UserStatusLockedException; import org.mxchange.jusercore.model.user.User; import org.mxchange.jusercore.model.user.UserSessionBeanRemote; import org.mxchange.jusercore.model.user.status.UserAccountStatus; +import org.mxchange.juserlogincore.events.confirmation.ObservableUserConfirmedAccountEvent; +import org.mxchange.juserlogincore.events.confirmation.UserConfirmedAccountEvent; import org.mxchange.pizzaapplication.beans.BasePizzaController; import org.mxchange.pizzaapplication.beans.helper.PizzaWebRequestHelperController; import org.mxchange.pizzaapplication.beans.user.PizzaUserWebSessionController; diff --git a/src/java/org/mxchange/pizzaapplication/beans/user/email_address/PizzaEmailChangeWebSessionBean.java b/src/java/org/mxchange/pizzaapplication/beans/user/email_address/PizzaEmailChangeWebSessionBean.java index 9bfce6f7..1e1e982b 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/user/email_address/PizzaEmailChangeWebSessionBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/user/email_address/PizzaEmailChangeWebSessionBean.java @@ -29,11 +29,11 @@ import javax.naming.InitialContext; import javax.naming.NamingException; import org.mxchange.jcontacts.contact.Contact; import org.mxchange.jcoreee.utils.FacesUtils; -import org.mxchange.jusercore.exceptions.UserPasswordMismatchException; import org.mxchange.jusercore.model.email_address.ChangeableEmailAddress; import org.mxchange.jusercore.model.email_address.EmailAddressChange; import org.mxchange.jusercore.model.user.User; import org.mxchange.jusercore.model.user.email_address.UserEmailChangeSessionBeanRemote; +import org.mxchange.juserlogincore.exceptions.UserPasswordMismatchException; import org.mxchange.pizzaapplication.beans.BasePizzaController; import org.mxchange.pizzaapplication.beans.features.PizzaFeaturesWebApplicationController; import org.mxchange.pizzaapplication.beans.user.login.PizzaUserLoginWebSessionController; diff --git a/src/java/org/mxchange/pizzaapplication/beans/user/login/PizzaUserLoginWebSessionBean.java b/src/java/org/mxchange/pizzaapplication/beans/user/login/PizzaUserLoginWebSessionBean.java index 81c2800a..339f26d2 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/user/login/PizzaUserLoginWebSessionBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/user/login/PizzaUserLoginWebSessionBean.java @@ -32,24 +32,24 @@ import javax.inject.Named; import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; -import org.mxchange.jusercore.container.login.LoginContainer; -import org.mxchange.jusercore.container.login.UserLoginContainer; -import org.mxchange.jusercore.events.login.ObservableUserLoggedInEvent; -import org.mxchange.jusercore.events.login.UserLoggedInEvent; -import org.mxchange.jusercore.events.logout.ObservableUserLogoutEvent; -import org.mxchange.jusercore.events.logout.UserLogoutEvent; -import org.mxchange.jusercore.events.user.password_change.ObservableUpdatedUserPasswordEvent; import org.mxchange.jusercore.exceptions.UserNotFoundException; -import org.mxchange.jusercore.exceptions.UserPasswordMismatchException; import org.mxchange.jusercore.exceptions.UserStatusLockedException; import org.mxchange.jusercore.exceptions.UserStatusUnconfirmedException; -import org.mxchange.jusercore.model.login.user.UserLoginSessionBeanRemote; import org.mxchange.jusercore.model.user.User; -import org.mxchange.jusercore.model.user.UserUtils; import org.mxchange.jusercore.model.user.password_history.PasswordHistory; import org.mxchange.jusercore.model.user.password_history.UserPasswordHistorySessionBeanRemote; import org.mxchange.jusercore.model.user.profilemodes.ProfileMode; import org.mxchange.jusercore.model.user.status.UserAccountStatus; +import org.mxchange.juserlogincore.container.login.LoginContainer; +import org.mxchange.juserlogincore.container.login.UserLoginContainer; +import org.mxchange.juserlogincore.events.login.ObservableUserLoggedInEvent; +import org.mxchange.juserlogincore.events.login.UserLoggedInEvent; +import org.mxchange.juserlogincore.events.logout.ObservableUserLogoutEvent; +import org.mxchange.juserlogincore.events.logout.UserLogoutEvent; +import org.mxchange.juserlogincore.events.user.password_change.ObservableUpdatedUserPasswordEvent; +import org.mxchange.juserlogincore.exceptions.UserPasswordMismatchException; +import org.mxchange.juserlogincore.login.UserLoginUtils; +import org.mxchange.juserlogincore.model.login.user.UserLoginSessionBeanRemote; import org.mxchange.pizzaapplication.beans.BasePizzaController; import org.mxchange.pizzaapplication.beans.user.PizzaUserWebSessionController; @@ -319,7 +319,7 @@ public class PizzaUserLoginWebSessionBean extends BasePizzaController implements LoginContainer container = new UserLoginContainer(this.getLoggedInUser(), this.getUserCurrentPassword()); // Now check if it matches - return UserUtils.ifPasswordMatches(container, this.getLoggedInUser()); + return UserLoginUtils.ifPasswordMatches(container, this.getLoggedInUser()); } @Override @@ -374,7 +374,7 @@ public class PizzaUserLoginWebSessionBean extends BasePizzaController implements // Check all passwords for (final PasswordHistory entry : this.getUserPasswordHistory()) { // Is password the same? - if (UserUtils.ifPasswordMatches(userPassword, entry.getUserPasswordHistoryUser())) { + if (UserLoginUtils.ifPasswordMatches(userPassword, entry.getUserPasswordHistoryUser())) { // Yes, found it isPasswordInHistory = true; break; diff --git a/src/java/org/mxchange/pizzaapplication/beans/user/password/PizzaUserPasswordWebRequestBean.java b/src/java/org/mxchange/pizzaapplication/beans/user/password/PizzaUserPasswordWebRequestBean.java index 3b025986..c6f6aedd 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/user/password/PizzaUserPasswordWebRequestBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/user/password/PizzaUserPasswordWebRequestBean.java @@ -28,16 +28,16 @@ import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; import org.mxchange.jcoreee.utils.FacesUtils; -import org.mxchange.jusercore.events.user.password_change.ObservableUpdatedUserPasswordEvent; -import org.mxchange.jusercore.events.user.password_change.UpdatedUserPasswordEvent; import org.mxchange.jusercore.exceptions.UserNotFoundException; -import org.mxchange.jusercore.exceptions.UserPasswordMismatchException; import org.mxchange.jusercore.exceptions.UserStatusLockedException; import org.mxchange.jusercore.exceptions.UserStatusUnconfirmedException; import org.mxchange.jusercore.model.user.User; import org.mxchange.jusercore.model.user.UserSessionBeanRemote; -import org.mxchange.jusercore.model.user.UserUtils; import org.mxchange.jusercore.model.user.password_history.PasswordHistory; +import org.mxchange.juserlogincore.events.user.password_change.ObservableUpdatedUserPasswordEvent; +import org.mxchange.juserlogincore.events.user.password_change.UpdatedUserPasswordEvent; +import org.mxchange.juserlogincore.exceptions.UserPasswordMismatchException; +import org.mxchange.juserlogincore.login.UserLoginUtils; import org.mxchange.pizzaapplication.beans.BasePizzaController; import org.mxchange.pizzaapplication.beans.features.PizzaFeaturesWebApplicationController; import org.mxchange.pizzaapplication.beans.user.login.PizzaUserLoginWebSessionController; @@ -118,7 +118,7 @@ public class PizzaUserPasswordWebRequestBean extends BasePizzaController impleme } else if (!this.featureController.isFeatureEnabled("change_user_password")) { //NOI18N // Editing is not allowed throw new IllegalStateException("User tried to change password."); //NOI18N - } else if (!UserUtils.ifPasswordMatches(this.getUserCurrentPassword(), this.userLoginController.getLoggedInUser())) { + } else if (!UserLoginUtils.ifPasswordMatches(this.getUserCurrentPassword(), this.userLoginController.getLoggedInUser())) { // Password mismatches this.showFacesMessage("form_user_change_password:userCurrentPassword", "Entered current password does not matched stored password."); //NOI18N @@ -160,7 +160,7 @@ public class PizzaUserPasswordWebRequestBean extends BasePizzaController impleme User user = this.userLoginController.getLoggedInUser(); // Encrypt password - String encryptedPassword = UserUtils.encryptPassword(this.getUserPassword()); + String encryptedPassword = UserLoginUtils.encryptPassword(this.getUserPassword()); // Set it in user user.setUserEncryptedPassword(encryptedPassword); diff --git a/src/java/org/mxchange/pizzaapplication/beans/user/register/PizzaUserRegisterWebSessionBean.java b/src/java/org/mxchange/pizzaapplication/beans/user/register/PizzaUserRegisterWebSessionBean.java index 92428f6e..43989454 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/user/register/PizzaUserRegisterWebSessionBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/user/register/PizzaUserRegisterWebSessionBean.java @@ -30,15 +30,15 @@ import javax.naming.NamingException; import org.mxchange.jcontacts.contact.Contact; import org.mxchange.jcontacts.contact.UserContact; import org.mxchange.jcoreee.utils.FacesUtils; -import org.mxchange.jusercore.events.registration.ObservableUserRegisteredEvent; -import org.mxchange.jusercore.events.registration.UserRegisteredEvent; import org.mxchange.jusercore.exceptions.DataRepeatMismatchException; import org.mxchange.jusercore.exceptions.EmailAddressAlreadyRegisteredException; import org.mxchange.jusercore.exceptions.UserNameAlreadyRegisteredException; import org.mxchange.jusercore.model.user.User; -import org.mxchange.jusercore.model.user.UserUtils; -import org.mxchange.jusercore.model.user.register.UserRegistrationSessionBeanRemote; import org.mxchange.jusercore.model.user.status.UserAccountStatus; +import org.mxchange.juserlogincore.events.registration.ObservableUserRegisteredEvent; +import org.mxchange.juserlogincore.events.registration.UserRegisteredEvent; +import org.mxchange.juserlogincore.login.UserLoginUtils; +import org.mxchange.juserlogincore.model.user.register.UserRegistrationSessionBeanRemote; import org.mxchange.pizzaapplication.beans.BasePizzaController; import org.mxchange.pizzaapplication.beans.contact.PizzaContactWebSessionController; import org.mxchange.pizzaapplication.beans.features.PizzaFeaturesWebApplicationController; @@ -166,7 +166,7 @@ public class PizzaUserRegisterWebSessionBean extends BasePizzaController impleme throw new FaceletException(new DataRepeatMismatchException("Passwords not matching.")); //NOI18N } else if (this.userController.ifBothPasswordsEmptyAllowed()) { // Both passwords are left empty and is allowed, then generate a random password - randomPassword = UserUtils.createRandomPassword(PizzaUserWebSessionController.MINIMUM_PASSWORD_LENGTH); + randomPassword = UserLoginUtils.createRandomPassword(PizzaUserWebSessionController.MINIMUM_PASSWORD_LENGTH); // Set it in both fields this.userController.setUserPassword(randomPassword); @@ -175,7 +175,7 @@ public class PizzaUserRegisterWebSessionBean extends BasePizzaController impleme } // Encrypt password - String encryptedPassword = UserUtils.encryptPassword(this.userController.getUserPassword()); + String encryptedPassword = UserLoginUtils.encryptPassword(this.userController.getUserPassword()); // Set it here user.setUserEncryptedPassword(encryptedPassword); @@ -255,7 +255,7 @@ public class PizzaUserRegisterWebSessionBean extends BasePizzaController impleme return ""; //NOI18N } else if (this.userController.ifBothPasswordsEmptyAllowed()) { // Both passwords are left empty and is allowed, then generate a random password - String randomPassword = UserUtils.createRandomPassword(PizzaUserWebSessionController.MINIMUM_PASSWORD_LENGTH); + String randomPassword = UserLoginUtils.createRandomPassword(PizzaUserWebSessionController.MINIMUM_PASSWORD_LENGTH); // Set it in both fields this.userController.setUserPassword(randomPassword); diff --git a/src/java/org/mxchange/pizzaapplication/beans/user/resendlink/PizzaResendLinkWebSessionBean.java b/src/java/org/mxchange/pizzaapplication/beans/user/resendlink/PizzaResendLinkWebSessionBean.java index 6d4fe162..99d61a4f 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/user/resendlink/PizzaResendLinkWebSessionBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/user/resendlink/PizzaResendLinkWebSessionBean.java @@ -27,15 +27,15 @@ import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; import org.mxchange.jcoreee.utils.FacesUtils; -import org.mxchange.jusercore.events.resendlink.ObservableUserResendLinkAccountEvent; -import org.mxchange.jusercore.events.resendlink.UserResendLinkAccountEvent; import org.mxchange.jusercore.exceptions.UserEmailAddressNotFoundException; import org.mxchange.jusercore.exceptions.UserNotFoundException; import org.mxchange.jusercore.exceptions.UserStatusConfirmedException; import org.mxchange.jusercore.exceptions.UserStatusLockedException; import org.mxchange.jusercore.model.user.User; -import org.mxchange.jusercore.model.user.resendlink.ResendLinkSessionBeanRemote; import org.mxchange.jusercore.model.user.status.UserAccountStatus; +import org.mxchange.juserlogincore.events.resendlink.ObservableUserResendLinkAccountEvent; +import org.mxchange.juserlogincore.events.resendlink.UserResendLinkAccountEvent; +import org.mxchange.juserlogincore.model.user.resendlink.ResendLinkSessionBeanRemote; import org.mxchange.pizzaapplication.beans.BasePizzaController; import org.mxchange.pizzaapplication.beans.localization.PizzaLocalizationSessionController; import org.mxchange.pizzaapplication.beans.user.PizzaUserWebSessionController; -- 2.39.5