|
@@ -116,19 +116,19 @@ public class ExecService {
|
|
|
String timestamp = String.valueOf(System.currentTimeMillis());
|
|
|
String signature = getSignature(timestamp, function.getCode());
|
|
|
HttpHeaders headers = new HttpHeaders();
|
|
|
- headers.add("apiAccessKey", cfg.getAccessKey());
|
|
|
- headers.add("apiSecreKey", cfg.getSecretKey());
|
|
|
- headers.add("apiName", StringUtil.isBlank(cfg.getApiName()) ? function.getCode() : cfg.getApiName());
|
|
|
- headers.add("apiVersion", cfg.getApiVersion());
|
|
|
- headers.add("apiTimestamp", timestamp);
|
|
|
- headers.add("apiSignature", signature);
|
|
|
+ headers.add("_api_access_key", cfg.getAccessKey());
|
|
|
+// headers.add("secretKey", cfg.getSecretKey());
|
|
|
+ headers.add("_api_name", cfg.getApiName());
|
|
|
+ headers.add("_api_version", cfg.getApiVersion());
|
|
|
+ headers.add("_api_timestamp", timestamp);
|
|
|
+ headers.add("_api_signature", signature);
|
|
|
return headers;
|
|
|
}
|
|
|
|
|
|
public String getSignature(String timestamp, String function) {
|
|
|
String source =
|
|
|
"_api_access_key=" + cfg.getAccessKey() +
|
|
|
- "&_api_name=" + function +
|
|
|
+ "&_api_name=" + cfg.getApiName() +
|
|
|
"&_api_timestamp=" + timestamp +
|
|
|
"&_api_version=" + cfg.getApiVersion();
|
|
|
return hmacSha1(source);
|