]> git.mxchange.org Git - addressbook-war.git/commitdiff
Continued:
authorRoland Haeder <roland@mxchange.org>
Tue, 13 Oct 2015 07:46:31 +0000 (09:46 +0200)
committerRoland Haeder <roland@mxchange.org>
Tue, 13 Oct 2015 07:56:16 +0000 (09:56 +0200)
- added container for transfering user instance and unencrypted password
- updated jar(s)
Signed-off-by:Roland Häder <roland@mxchange.org>

lib/juser-core.jar
lib/juser-lib.jar
src/java/org/mxchange/addressbook/beans/login/UserLoginWebBean.java

index abd0ecf2da4423449cdd37664fe0330b2daa9fda..bf521fb34418443b4313045a38e41f3fc864b0b5 100644 (file)
Binary files a/lib/juser-core.jar and b/lib/juser-core.jar differ
index 1597aad692afca59bc4c4911db7312e08d5ece1f..b5dc6f08dbf2df7b0b820975e446e96ea3d600b8 100644 (file)
Binary files a/lib/juser-lib.jar and b/lib/juser-lib.jar differ
index 9496db3d558bb965bb84c0ff51950cd39e2cab7b..a8ca092867dfeda94d0f626b0d4e29dd294686b1 100644 (file)
@@ -25,7 +25,10 @@ import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import org.mxchange.addressbook.beans.user.UserWebController;
+import org.mxchange.jusercore.container.login.LoginContainer;
+import org.mxchange.jusercore.container.login.UserLoginContainer;
 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.UserLoginSessionBeanRemote;
@@ -83,19 +86,22 @@ public class UserLoginWebBean implements UserLoginWebController {
                // Get user instance
                User user = this.userController.createUserInstance();
 
+               // Create login container
+               LoginContainer container = new UserLoginContainer(user, this.userController.getUserPassword());
+
                try {
                        // Call bean
-                       User confirmedUser = this.loginBean.validateUserAccountStatus(user);
+                       User confirmedUser = this.loginBean.validateUserAccountStatus(container);
 
                        // All fine here so set it here
                        this.setLoggedInUser(confirmedUser);
-               } catch (final UserNotFoundException | UserStatusLockedException | UserStatusUnconfirmedException ex) {
+
+                       // All fine
+                       return "login"; //NOI18N
+               } catch (final UserNotFoundException | UserStatusLockedException | UserStatusUnconfirmedException | UserPasswordMismatchException ex) {
                        // Throw again
                        throw new FaceletException(ex);
                }
-
-               // All fine
-               return "login"; //NOI18N
        }
 
        @Override