Commit 310a5dab by 陶光胜

登陆授权

parent 77d444b8
......@@ -153,7 +153,8 @@ public class LoginController {
}
@RequestMapping("login")
public RestResponse login(String nationCode, String phoneNumber, Integer enterpriseId, String password) {
public RestResponse login(HttpServletRequest request, HttpServletResponse response,
String nationCode, String phoneNumber, Integer enterpriseId, String password, String appId) {
if (StringUtils.isBlank(password) || StringUtils.isBlank(phoneNumber) || enterpriseId == null) {
return EnterpriseRestResponse.failure(ErrorCode.PARAMETER_ERROR);
}
......@@ -212,7 +213,15 @@ public class LoginController {
//塞缓存
UserDetailUtils.setUserDetail(userDetail);
logger.info("登录所花时间:{}", System.currentTimeMillis() - startTime);
return RestResponse.success(userDetail);
if(StringUtils.isNotBlank(appId)){
try {
response.sendRedirect("https://four.gicdev.com/application-auth-center/auth/custom?authToken="+appId);
} catch (IOException e) {
e.printStackTrace();
}
} else {
return RestResponse.success(userDetail);
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment