|
@@ -25,6 +25,7 @@ import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
+import org.springframework.web.util.UriUtils;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import java.io.UnsupportedEncodingException;
|
|
@@ -135,7 +136,7 @@ public class OpenApiController {
|
|
|
|
|
|
@ApiOperation(value = "单点登录")
|
|
|
@ApiResponses({@ApiResponse(code = 200, message = "返回消息", response = Result.class)})
|
|
|
- @RequestMapping(value = "/account/login", method = RequestMethod.POST)
|
|
|
+ @RequestMapping(value = "/F/login", method = RequestMethod.POST)
|
|
|
@Aac(auth = BOOL.FALSE)
|
|
|
public Result accountLogin(@ApiParam(value = "时间", required = true) @RequestParam String time,
|
|
|
@ApiParam(value = "地址", required = true) @RequestParam String path,
|
|
@@ -152,16 +153,16 @@ public class OpenApiController {
|
|
|
if (Objects.isNull(signature) || Objects.equals(signature, "")) {
|
|
|
throw ExceptionResultEnum.PARAMS_ERROR.exception("鉴权信息不能为空");
|
|
|
}
|
|
|
- signature = URLDecoder.decode(signature, SystemConstant.CHARSET_NAME);
|
|
|
+ signature = UriUtils.decode(signature, SystemConstant.CHARSET_NAME);
|
|
|
if (Objects.isNull(account) || Objects.equals(account, "")) {
|
|
|
throw ExceptionResultEnum.PARAMS_ERROR.exception("工号不能为空");
|
|
|
}
|
|
|
- account = URLDecoder.decode(account, SystemConstant.CHARSET_NAME);
|
|
|
+ account = UriUtils.decode(account, SystemConstant.CHARSET_NAME);
|
|
|
|
|
|
BasicSchool basicSchool = AuthThirdUtil.hasPermissionCas(time, path, signature);
|
|
|
OpenParams openParams = null;
|
|
|
if (Objects.nonNull(params) && !Objects.equals(params, "")) {
|
|
|
- String decodeJson = URLDecoder.decode(params, SystemConstant.CHARSET_NAME);
|
|
|
+ String decodeJson = UriUtils.decode(params, SystemConstant.CHARSET_NAME);
|
|
|
openParams = JacksonUtil.readJson(decodeJson, OpenParams.class);
|
|
|
}
|
|
|
|
|
@@ -175,7 +176,7 @@ public class OpenApiController {
|
|
|
|
|
|
LoginResult loginResult = teachcloudCommonService.login(sysUser.getPassword(), sysUser, AppSourceEnum.CAS_THIRD);
|
|
|
if (Objects.nonNull(returnUrl) && !Objects.equals(returnUrl, "")) {
|
|
|
- returnUrl = URLDecoder.decode(returnUrl, SystemConstant.CHARSET_NAME);
|
|
|
+ returnUrl = UriUtils.decode(returnUrl, SystemConstant.CHARSET_NAME);
|
|
|
}
|
|
|
loginResult.setReturnUrl(returnUrl);
|
|
|
return ResultUtil.ok(loginResult);
|