|
@@ -70,9 +70,6 @@ public class AuthController extends ControllerSupport {
|
|
|
@PostMapping("logout")
|
|
|
public void logout() {
|
|
|
User user = getAccessUser();
|
|
|
- if (null == user) {
|
|
|
- throw new StatusException("B-001001", "用户已登出");
|
|
|
- }
|
|
|
authService.logout(user);
|
|
|
}
|
|
|
|
|
@@ -92,8 +89,9 @@ public class AuthController extends ControllerSupport {
|
|
|
|
|
|
@ApiOperation(value = "第三方机构接入", notes = "")
|
|
|
@PostMapping("/thirdPartyAccess")
|
|
|
- public User thirdPartyAccess(HttpServletRequest request, @RequestParam Long orgId, @RequestParam String loginName,
|
|
|
- @RequestParam String appId, @RequestParam String timestamp, @RequestParam String token) {
|
|
|
+ public User thirdPartyAccess(HttpServletRequest request, @RequestParam Long orgId,
|
|
|
+ @RequestParam String loginName, @RequestParam String appId,
|
|
|
+ @RequestParam String timestamp, @RequestParam String token) {
|
|
|
String realIp = request.getHeader("x-forwarded-for");
|
|
|
if (StringUtils.isBlank(realIp)) {
|
|
|
realIp = request.getHeader("x-real-ip");
|
|
@@ -109,11 +107,14 @@ public class AuthController extends ControllerSupport {
|
|
|
int code = 1000 + RandomUtils.nextInt(1, 9999);
|
|
|
req.setCode(String.valueOf(code));
|
|
|
|
|
|
- int smsEffectivetime = PropertiesUtil.getInt(PropKeys.SEND_VERIFICATION_CODE_EFFECTIVE_TIME, 120);
|
|
|
- int smsIntervalSeconds = PropertiesUtil.getInt(PropKeys.SEND_VERIFICATION_CODE_INTERVAL_SECONDS, 60);
|
|
|
+ int smsEffectivetime = PropertiesUtil.getInt(PropKeys.SEND_VERIFICATION_CODE_EFFECTIVE_TIME,
|
|
|
+ 120);
|
|
|
+ int smsIntervalSeconds = PropertiesUtil
|
|
|
+ .getInt(PropKeys.SEND_VERIFICATION_CODE_INTERVAL_SECONDS, 60);
|
|
|
|
|
|
String smsSign = PropertiesUtil.getString(PropKeys.SEND_VERIFICATION_CODE_SIGN);
|
|
|
- String smsTemplatecode = PropertiesUtil.getString(PropKeys.SEND_VERIFICATION_CODE_TEMPLATE_CODE);
|
|
|
+ String smsTemplatecode = PropertiesUtil
|
|
|
+ .getString(PropKeys.SEND_VERIFICATION_CODE_TEMPLATE_CODE);
|
|
|
|
|
|
if (StringUtils.isBlank(smsSign)) {
|
|
|
throw new StatusException("B-001060", "签名未配置");
|
|
@@ -131,7 +132,8 @@ public class AuthController extends ControllerSupport {
|
|
|
|
|
|
@ApiOperation(value = "绑定手机号", notes = "")
|
|
|
@PostMapping("/bindSecurityPhone")
|
|
|
- public void bindSecurityPhone(@RequestParam String phone, @RequestParam String verificationCode) {
|
|
|
+ public void bindSecurityPhone(@RequestParam String phone,
|
|
|
+ @RequestParam String verificationCode) {
|
|
|
CheckSmsCodeReq req = new CheckSmsCodeReq();
|
|
|
req.setCode(verificationCode);
|
|
|
req.setPhone(phone);
|