Add code.
parent
be27292699
commit
e99424db01
|
@ -67,7 +67,7 @@ public class OAuth2Controller extends BaseController {
|
||||||
final RestOath2CallbackResponse result = new RestOath2CallbackResponse();
|
final RestOath2CallbackResponse result = new RestOath2CallbackResponse();
|
||||||
result.setEmail(user.getEmail());
|
result.setEmail(user.getEmail());
|
||||||
result.setGoogleSync(user.getGoogleSync());
|
result.setGoogleSync(user.getGoogleSync());
|
||||||
result.setSyncCode(user.getSyncCode());
|
result.setSyncCode(code);
|
||||||
result.setJwtToken(jwtToken);
|
result.setJwtToken(jwtToken);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,10 @@ public class OAuth2Controller extends BaseController {
|
||||||
@RequestMapping(method = RequestMethod.PUT, value = "confirmaccountsync", produces = {"application/json"})
|
@RequestMapping(method = RequestMethod.PUT, value = "confirmaccountsync", produces = {"application/json"})
|
||||||
@ResponseStatus(value = HttpStatus.OK)
|
@ResponseStatus(value = HttpStatus.OK)
|
||||||
public RestOath2CallbackResponse confirmAccountSync(@NotNull @RequestParam String email, @NotNull @RequestParam String code, @NotNull HttpServletResponse response) throws WiseMappingException {
|
public RestOath2CallbackResponse confirmAccountSync(@NotNull @RequestParam String email, @NotNull @RequestParam String code, @NotNull HttpServletResponse response) throws WiseMappingException {
|
||||||
logger.debug("confirmAccountSync:" + email + "-" + code);
|
logger.debug("confirmAccountSync:" + email + " - " + code);
|
||||||
|
if (email == null || code == null) {
|
||||||
|
throw new WiseMappingException("Illegal argument exception: " + email + " - " + code);
|
||||||
|
}
|
||||||
|
|
||||||
// Authenticate ...
|
// Authenticate ...
|
||||||
final Account user = userService.createAndAuthUserFromGoogle(code);
|
final Account user = userService.createAndAuthUserFromGoogle(code);
|
||||||
|
|
Loading…
Reference in New Issue