|
|
@ -36,12 +36,14 @@ public class Signature { |
|
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
|
Map<String, String> parameters = data; |
|
|
|
//1、解析参数,校验_app是否正确,_t是否在5分钟内。
|
|
|
|
|
|
|
|
//检验_app 参数,1参数中是否存在2该参数是否为空3_app参数值是否在数据库中存在
|
|
|
|
if (!parameters.containsKey("_app") || |
|
|
|
parameters.get("_app") == null || |
|
|
|
parameters.get("_app").trim().isEmpty()) { |
|
|
|
return rb.setMsg("_app参数缺失或无效"); |
|
|
|
} |
|
|
|
//2、根据_app参数获取对应的secret值。
|
|
|
|
//2、根据_app参数获取对应的secret值。后续考虑从数据库中获取。
|
|
|
|
String secret = getSecret(parameters.get("_app")); |
|
|
|
if (StringUtils.isEmpty(secret)) { |
|
|
|
return rb.setMsg("_app参数不正确"); |