Outh working!. Pending:

- Test all databases
- Migration Scripts
- Manage error due to changing of authentication schemas.
- Link from the login page.
- What happend with the logout ?.
This commit is contained in:
Paulo Gustavo Veiga
2013-03-17 18:51:33 -03:00
parent 2f8df725c9
commit 94356a5773
13 changed files with 113 additions and 40 deletions

View File

@@ -19,6 +19,8 @@
package com.wisemapping.webmvc;
import com.wisemapping.model.AuthenticationSchema;
import com.wisemapping.service.InvalidAuthSchemaException;
import com.wisemapping.validator.Messages;
import com.wisemapping.exceptions.WiseMappingException;
import com.wisemapping.model.User;
@@ -72,9 +74,8 @@ public class UsersController {
userService.resetPassword(email);
result = new ModelAndView("forgotPasswordSuccess");
} catch (InvalidUserEmailException e) {
} catch (InvalidUserEmailException|InvalidAuthSchemaException e) {
result = new ModelAndView("forgotPasswordError");
}
return result;
}
@@ -110,6 +111,7 @@ public class UsersController {
user.setPassword(userBean.getPassword());
boolean confirmRegistrationByEmail = false;
user.setAuthenticationSchema(AuthenticationSchema.DATABASE);
userService.createUser(user, confirmRegistrationByEmail,true);
// Forward to the success view ...