|
@@ -7,19 +7,6 @@
|
|
|
|
|
|
package cn.com.qmth.examcloud.app.controller;
|
|
|
|
|
|
-import static cn.com.qmth.examcloud.app.model.Constants.PARAM_APP_KEY;
|
|
|
-import static cn.com.qmth.examcloud.app.model.Constants.PARAM_APP_TOKEN;
|
|
|
-
|
|
|
-import org.slf4j.Logger;
|
|
|
-import org.slf4j.LoggerFactory;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestHeader;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
-import org.springframework.web.bind.annotation.RequestParam;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
-
|
|
|
import cn.com.qmth.examcloud.app.model.LoginInfo;
|
|
|
import cn.com.qmth.examcloud.app.model.LoginType;
|
|
|
import cn.com.qmth.examcloud.app.model.Result;
|
|
@@ -28,6 +15,13 @@ import cn.com.qmth.examcloud.app.service.CoreAuthService;
|
|
|
import cn.com.qmth.examcloud.app.service.CoreBasicService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import static cn.com.qmth.examcloud.app.model.Constants.PARAM_APP_KEY;
|
|
|
+import static cn.com.qmth.examcloud.app.model.Constants.PARAM_APP_TOKEN;
|
|
|
|
|
|
/**
|
|
|
* 认证中心相关接口
|
|
@@ -119,9 +113,9 @@ public class UserAuthRestController {
|
|
|
|
|
|
@ApiOperation(value = "修改密码接口")
|
|
|
@RequestMapping(value = "/user/update/password", method = {RequestMethod.POST})
|
|
|
- public Result updatePassword(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @RequestParam String password,
|
|
|
+ public Result updatePassword(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @RequestParam String password,
|
|
|
@RequestParam String newPassword) throws Exception {
|
|
|
- return authService.updateStudentPassword(key, token,password, newPassword);
|
|
|
+ return authService.updateStudentPassword(key, token, password, newPassword);
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "重置密码接口")
|
|
@@ -135,20 +129,20 @@ public class UserAuthRestController {
|
|
|
public Result userBindingPhone(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @RequestParam String phone, @RequestParam String code) throws Exception {
|
|
|
return authService.userBindingPhone(key, token, phone, code);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
@ApiOperation(value = "极验-验证初始化接口")
|
|
|
@PostMapping(value = "/verifyCode/register")
|
|
|
- public Result register(@RequestParam String user_id,@RequestParam String client_type,@RequestParam(required = false) String ip_address) throws Exception{
|
|
|
- return authService.register(user_id, client_type, ip_address) ;
|
|
|
+ public Result register(@RequestParam String user_id, @RequestParam String client_type, @RequestParam(required = false) String ip_address) throws Exception {
|
|
|
+ return authService.register(user_id, client_type, ip_address);
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "极验-验证码登录接口")
|
|
|
@PostMapping(value = "/verifyCode/gt/login")
|
|
|
public Result geetestLogin(
|
|
|
- @RequestParam String seccode,@RequestParam String validate,@RequestParam String challenge,
|
|
|
- @RequestParam String user_id,@RequestParam String client_type,@RequestParam(required = false) String ip_address,
|
|
|
- @RequestParam String accountValue,@RequestParam String password,@RequestParam String accountType,
|
|
|
- @RequestParam Long rootOrgId) throws Exception{
|
|
|
+ @RequestParam String seccode, @RequestParam String validate, @RequestParam String challenge,
|
|
|
+ @RequestParam String user_id, @RequestParam String client_type, @RequestParam(required = false) String ip_address,
|
|
|
+ @RequestParam String accountValue, @RequestParam String password, @RequestParam String accountType,
|
|
|
+ @RequestParam Long rootOrgId) throws Exception {
|
|
|
|
|
|
return authService.geetestLogin(seccode, validate, challenge, user_id, client_type, ip_address, accountValue, password, accountType, rootOrgId);
|
|
|
}
|