|
@@ -9,6 +9,7 @@ import com.qmth.teachcloud.exchange.common.entity.BasicSchool;
|
|
import com.qmth.teachcloud.exchange.common.enums.ExceptionResultEnum;
|
|
import com.qmth.teachcloud.exchange.common.enums.ExceptionResultEnum;
|
|
import com.qmth.teachcloud.exchange.common.service.BasicSchoolService;
|
|
import com.qmth.teachcloud.exchange.common.service.BasicSchoolService;
|
|
import com.qmth.teachcloud.exchange.common.service.CommonService;
|
|
import com.qmth.teachcloud.exchange.common.service.CommonService;
|
|
|
|
+import com.qmth.teachcloud.exchange.common.util.Base64Util;
|
|
import com.qmth.teachcloud.exchange.common.util.JacksonUtil;
|
|
import com.qmth.teachcloud.exchange.common.util.JacksonUtil;
|
|
import com.qmth.teachcloud.exchange.common.util.ServletUtil;
|
|
import com.qmth.teachcloud.exchange.common.util.ServletUtil;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.Logger;
|
|
@@ -21,6 +22,7 @@ import javax.servlet.http.HttpServletResponse;
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
import java.net.URLDecoder;
|
|
import java.net.URLDecoder;
|
|
import java.net.URLEncoder;
|
|
import java.net.URLEncoder;
|
|
|
|
+import java.nio.charset.StandardCharsets;
|
|
import java.util.Objects;
|
|
import java.util.Objects;
|
|
import java.util.Optional;
|
|
import java.util.Optional;
|
|
import java.util.StringJoiner;
|
|
import java.util.StringJoiner;
|
|
@@ -88,7 +90,7 @@ public class CommonServiceImpl implements CommonService {
|
|
StringJoiner stringJoiner = new StringJoiner("")
|
|
StringJoiner stringJoiner = new StringJoiner("")
|
|
.add(teachcloudLoginUrl)
|
|
.add(teachcloudLoginUrl)
|
|
.add(SystemConstant.GET_UNKNOWN).add(SystemConstant.HEADER_TIME).add(SystemConstant.GET_EQUAL).add(String.valueOf(timestamp))
|
|
.add(SystemConstant.GET_UNKNOWN).add(SystemConstant.HEADER_TIME).add(SystemConstant.GET_EQUAL).add(String.valueOf(timestamp))
|
|
- .add(SystemConstant.GET_SYMBOL).add(SystemConstant.SIGNATURE).add(SystemConstant.GET_EQUAL).add(URLEncoder.encode(signature, SystemConstant.CHARSET_NAME))
|
|
|
|
|
|
+ .add(SystemConstant.GET_SYMBOL).add(SystemConstant.SIGNATURE).add(SystemConstant.GET_EQUAL).add(Base64Util.encode(signature.getBytes(StandardCharsets.UTF_8)))
|
|
.add(SystemConstant.GET_SYMBOL).add(SystemConstant.USER).add(SystemConstant.GET_EQUAL).add(URLEncoder.encode(account, SystemConstant.CHARSET_NAME));
|
|
.add(SystemConstant.GET_SYMBOL).add(SystemConstant.USER).add(SystemConstant.GET_EQUAL).add(URLEncoder.encode(account, SystemConstant.CHARSET_NAME));
|
|
|
|
|
|
if (Objects.nonNull(returnUrl) && !Objects.equals(returnUrl, "")) {
|
|
if (Objects.nonNull(returnUrl) && !Objects.equals(returnUrl, "")) {
|