|
|
@ -39,6 +39,7 @@ public class ZbFactoryAccountsInterceptor implements HandlerInterceptor { |
|
|
|
|
|
|
|
|
|
|
|
String body = myRequestWrapper.getBody(); |
|
|
|
String body = myRequestWrapper.getBody(); |
|
|
|
JSONObject bodyJson = JSONObject.parseObject(body); |
|
|
|
JSONObject bodyJson = JSONObject.parseObject(body); |
|
|
|
|
|
|
|
log.info("bodyJson {}",bodyJson,toString()); |
|
|
|
|
|
|
|
|
|
|
|
Map<String, String> params = new HashMap<>(); |
|
|
|
Map<String, String> params = new HashMap<>(); |
|
|
|
params.put("app_key",appKey); |
|
|
|
params.put("app_key",appKey); |
|
|
@ -48,8 +49,12 @@ public class ZbFactoryAccountsInterceptor implements HandlerInterceptor { |
|
|
|
params.put("sign_method",signMethod); |
|
|
|
params.put("sign_method",signMethod); |
|
|
|
params.put("timestamp",timestamp); |
|
|
|
params.put("timestamp",timestamp); |
|
|
|
params.put("v",v); |
|
|
|
params.put("v",v); |
|
|
|
|
|
|
|
log.info(" 验证参数 {}",bodyJson); |
|
|
|
String newSign = QmSignUntil.signTopRequest(params, zbFactoryProperties.getSecretkey(), signMethod, bodyJson.toJSONString()); |
|
|
|
String newSign = QmSignUntil.signTopRequest(params, zbFactoryProperties.getSecretkey(), signMethod, bodyJson.toJSONString()); |
|
|
|
|
|
|
|
log.info(" 签名 old {}",sign); |
|
|
|
|
|
|
|
log.info(" 新签名 old {}",newSign); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(!newSign.equals(sign)){ |
|
|
|
if(!newSign.equals(sign)){ |
|
|
|
returnJson(response,JSONObject.toJSONString(R.fail(203,"签名认证失败"))); |
|
|
|
returnJson(response,JSONObject.toJSONString(R.fail(203,"签名认证失败"))); |
|
|
|
return false; |
|
|
|
return false; |
|
|
|