Finish OpenId implementation.

This commit is contained in:
Paulo Gustavo Veiga
2013-03-17 23:17:55 -03:00
parent 94356a5773
commit 9b21c77485
16 changed files with 80 additions and 47 deletions

View File

@@ -45,14 +45,14 @@ public class LoginController {
return result;
}
@RequestMapping(value = "loginOpenId", method = RequestMethod.GET)
@RequestMapping(value = "loginopenid", method = RequestMethod.GET)
protected ModelAndView showLoginOpenIdPage() {
final User user = Utils.getUser(false);
ModelAndView result;
if (user != null) {
result = new ModelAndView("forward:/c/maps/");
} else {
result = new ModelAndView("loginOpenId");
result = new ModelAndView("loginopenid");
}
return result;
}

View File

@@ -19,7 +19,7 @@
package com.wisemapping.webmvc;
import com.wisemapping.model.AuthenticationSchema;
import com.wisemapping.model.AuthenticationType;
import com.wisemapping.service.InvalidAuthSchemaException;
import com.wisemapping.validator.Messages;
import com.wisemapping.exceptions.WiseMappingException;
@@ -111,7 +111,7 @@ public class UsersController {
user.setPassword(userBean.getPassword());
boolean confirmRegistrationByEmail = false;
user.setAuthenticationSchema(AuthenticationSchema.DATABASE);
user.setAuthenticationType(AuthenticationType.DATABASE);
userService.createUser(user, confirmRegistrationByEmail,true);
// Forward to the success view ...