提交 b45f67f0 编写于 作者: Chongwen.jiang's avatar Chongwen.jiang

日志添加打印。。

上级 def7739c
流水线 #22104 已失败 于阶段
in 0 second
...@@ -668,7 +668,7 @@ public class LoginServiceImpl implements LoginService { ...@@ -668,7 +668,7 @@ public class LoginServiceImpl implements LoginService {
String keys = jsonObject.getString("keys"); String keys = jsonObject.getString("keys");
JSONArray arr = JSONObject.parseArray(keys); JSONArray arr = JSONObject.parseArray(keys);
JSONObject jsonObject1 = JSONObject.parseObject(arr.getString(0)); JSONObject jsonObject1 = JSONObject.parseObject(arr.getString(0));
//logger.info("checkIdentifyToken-jsonObject1:{}", jsonObject1); logger.info("checkIdentifyToken-jsonObject1:{}", jsonObject1);
// 通过架包生成publicKey // 通过架包生成publicKey
PublicKey publicKey; PublicKey publicKey;
...@@ -684,7 +684,7 @@ public class LoginServiceImpl implements LoginService { ...@@ -684,7 +684,7 @@ public class LoginServiceImpl implements LoginService {
String sub; String sub;
try { try {
String claim = new String(Base64.decodeBase64(identifyToken.split("\\.")[1])); String claim = new String(Base64.decodeBase64(identifyToken.split("\\.")[1]));
//logger.info("checkIdentifyToken-claim:{}", claim); logger.info("checkIdentifyToken-claim:{}", claim);
aud = JSONObject.parseObject(claim).get("aud").toString(); aud = JSONObject.parseObject(claim).get("aud").toString();
sub = JSONObject.parseObject(claim).get("sub").toString(); sub = JSONObject.parseObject(claim).get("sub").toString();
// appleUserId从token中解码取出后赋值 // appleUserId从token中解码取出后赋值
...@@ -712,7 +712,7 @@ public class LoginServiceImpl implements LoginService { ...@@ -712,7 +712,7 @@ public class LoginServiceImpl implements LoginService {
jwtParser.requireSubject(subject); jwtParser.requireSubject(subject);
try { try {
Jws<Claims> claim = jwtParser.parseClaimsJws(jwt); Jws<Claims> claim = jwtParser.parseClaimsJws(jwt);
//logger.info("apple-verify-claim:{}", JSON.toJSONString(claim)); logger.info("apple-verify-claim:{}", JSON.toJSONString(claim));
//logger.info("apple-verify-claim.getBody:{}", JSON.toJSONString(claim.getBody())); //logger.info("apple-verify-claim.getBody:{}", JSON.toJSONString(claim.getBody()));
if (claim != null && claim.getBody().containsKey("auth_time")) { if (claim != null && claim.getBody().containsKey("auth_time")) {
request.setInfo(JSON.toJSONString(claim.getBody())); request.setInfo(JSON.toJSONString(claim.getBody()));
...@@ -722,8 +722,10 @@ public class LoginServiceImpl implements LoginService { ...@@ -722,8 +722,10 @@ public class LoginServiceImpl implements LoginService {
} }
return false; return false;
} catch (ExpiredJwtException e) { } catch (ExpiredJwtException e) {
logger.info("苹果token过期");
throw new PicaException("苹果token过期", e.getMessage()); throw new PicaException("苹果token过期", e.getMessage());
} catch (Exception e) { } catch (Exception e) {
logger.info("苹果token非法");
throw new PicaException("苹果token非法", e.getMessage()); throw new PicaException("苹果token非法", e.getMessage());
} }
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册