public class RequestSignUtil extends Object
| 构造器和说明 |
|---|
RequestSignUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static boolean |
checkInboundRequestSign(javax.servlet.http.HttpServletRequest httpServletRequest,
String appSecret) |
static boolean |
checkInboundRequestSign(String method,
String bodyMd5,
Map<String,String> headers,
Map<String,String> params,
String appSecret)
用于校验请求进来的参数是否和sign匹配
|
public static boolean checkInboundRequestSign(String method, String bodyMd5, Map<String,String> headers, Map<String,String> params, String appSecret)
method - 请求的方法名称,GET、POSTbodyMd5 - body的md5,调用方自行计算,计算方式见文档headers - 所有的请求headerparams - 所有请求参数,form表单和query的所有参数appSecret - 用户的appSecrettrue 如果匹配public static boolean checkInboundRequestSign(javax.servlet.http.HttpServletRequest httpServletRequest,
String appSecret)
throws IOException
IOExceptionCopyright © 2018. All rights reserved.