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.juserlogincore.model.user.login.UserLoginSessionBeanRemote;
import org.mxchange.pizzaapplication.beans.BasePizzaController;
import org.mxchange.pizzaapplication.beans.user.PizzaUserWebSessionController;
this.updatePasswordHistory(event.getPasswordHistory());
}
- @Override
+ /**
+ * Logout for administrator area. If a logged-in user instance exists, it is
+ * being logged-out, too.
+ * <p>
+ * @return Outcome (should be redirected)
+ */
public String doAdminLogout () {
// Is a user logged-in?
if (this.isUserLoggedIn()) {
return "index?faces-redirect=true"; //NOI18N
}
- @Override
+ /**
+ * Logins the user, if the account is found, confirmed and unlocked.
+ * <p>
+ * @return Redirect target
+ */
public String doUserLogin () {
// Get user instance
User user = this.userController.createUserLogin();
// Create login container
- LoginContainer container = new UserLoginContainer(user, this.userController.getUserPassword());
+ LoginContainer loginContainer = new UserLoginContainer(user, this.userController.getUserPassword());
try {
// Call bean
- User confirmedUser = this.userLoginBean.validateUserAccountStatus(container);
+ User confirmedUser = this.userLoginBean.validateUserAccountStatus(loginContainer);
// All fine here so set it here
this.setLoggedInUser(confirmedUser);
}
}
- @Override
+ /**
+ * Logout for current user by invalidating the current session.
+ * <p>
+ * @return Outcome (should be redirected)
+ */
public String doUserLogout () {
// Is loggedInUser set?
if (this.getLoggedInUser() == null) {
this.loggedInUser = loggedInUser;
}
- @Override
+ /**
+ * Getter for current password (clear text)
+ * <p>
+ * @return Current password
+ */
public String getUserCurrentPassword () {
return this.userCurrentPassword;
}
- @Override
+ /**
+ * Setter for current password (clear text)
+ * <p>
+ * @param userCurrentPassword Current password
+ */
public void setUserCurrentPassword (final String userCurrentPassword) {
this.userCurrentPassword = userCurrentPassword;
}
Context context = new InitialContext();
// Try to lookup
- this.userLoginBean = (UserLoginSessionBeanRemote) context.lookup("java:global/jrecruiter-ejb/userLogin!org.mxchange.juserlogincore.model.login.user.user.UserLoginSessionBeanRemote"); //NOI18N
+ this.userLoginBean = (UserLoginSessionBeanRemote) context.lookup("java:global/jrecruiter-ejb/userLogin!org.mxchange.juserlogincore.model.user.login.UserLoginSessionBeanRemote"); //NOI18N
// Also find this
this.userPasswordHistoryBean = (UserPasswordHistorySessionBeanRemote) context.lookup("java:global/jrecruiter-ejb/userPasswordHistory!org.mxchange.jusercore.model.user.password_history.UserPasswordHistorySessionBeanRemote"); //NOI18N