changes
This commit is contained in:
@@ -16,7 +16,6 @@ import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 移动端单点登录控制器,提供授权跳转、授权地址获取和移动门户回调入口。
|
||||
*/
|
||||
|
||||
@@ -75,8 +75,9 @@ public class SysMobileSsoServiceImpl implements SysMobileSsoService {
|
||||
if (StrUtil.isBlank(code)) {
|
||||
throw new BaseException("移动端单点登录授权码不能为空");
|
||||
}
|
||||
|
||||
JSONObject tokenJson = exchangeAccessToken(code);
|
||||
log.debug("移动端单点登录: "+code+","+state);
|
||||
log.debug("移动端单点登录tokenJson返回内容:" + tokenJson);
|
||||
String loginName = tokenJson.getStr("username");
|
||||
if (StrUtil.isBlank(loginName)) {
|
||||
log.error("移动端单点登录未返回 username,返回内容:" + tokenJson);
|
||||
@@ -117,6 +118,7 @@ public class SysMobileSsoServiceImpl implements SysMobileSsoService {
|
||||
.timeout(conf.getInt("mobile.sso.timeout", 10000))
|
||||
.execute()) {
|
||||
String body = response.body();
|
||||
log.debug("移动端单点登录返回内容:" + body);
|
||||
if (!response.isOk()) {
|
||||
log.error("移动端单点登录 token 接口请求失败,状态码:" + response.getStatus() + ",返回内容:" + body);
|
||||
throw new BaseException("移动端单点登录 token 接口请求失败");
|
||||
|
||||
Reference in New Issue
Block a user