Tidying.
This commit is contained in:
parent
2afccfc633
commit
e659e15f90
|
@ -1,7 +1,5 @@
|
|||
package samples.gae.users;
|
||||
|
||||
import com.google.appengine.api.datastore.EntityNotFoundException;
|
||||
|
||||
/**
|
||||
*
|
||||
* Service used to maintain a list of users who are registered with the application.
|
||||
|
|
|
@ -38,7 +38,7 @@ public class GaeAppController {
|
|||
|
||||
String logoutUrl = UserServiceFactory.getUserService().createLogoutURL("/loggedout.htm");
|
||||
|
||||
response.sendRedirect(logoutUrl);
|
||||
response.sendRedirect(logoutUrl);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/loggedout.htm", method= RequestMethod.GET)
|
||||
|
|
|
@ -34,11 +34,11 @@ public class RegistrationController {
|
|||
return new RegistrationForm();
|
||||
}
|
||||
|
||||
@RequestMapping(method = RequestMethod.POST)
|
||||
public String register(@Valid RegistrationForm form, BindingResult result) {
|
||||
if (result.hasErrors()) {
|
||||
return null;
|
||||
}
|
||||
@RequestMapping(method = RequestMethod.POST)
|
||||
public String register(@Valid RegistrationForm form, BindingResult result) {
|
||||
if (result.hasErrors()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
|
||||
GaeUser currentUser = (GaeUser)authentication.getPrincipal();
|
||||
|
@ -56,6 +56,6 @@ public class RegistrationController {
|
|||
// Update the context with the full authentication
|
||||
SecurityContextHolder.getContext().setAuthentication(new GaeUserAuthentication(user, authentication.getDetails()));
|
||||
|
||||
return "redirect:/home.htm";
|
||||
}
|
||||
return "redirect:/home.htm";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue