SAP hana 接口API使用Postman请求时签名处理,自动签名脚本
用postman调试SAP HANA开发提供的API接口,签名计算方法
postman.clearGlobalVariable();
postman.clearEnvironmentVariables();
var _host = 'izrhhanab.hans-china.com';
var _unix_ts = Math.round(new Date().getTime()/1000);
var _guid = '04910e6e-59fb-4650-baa9-5bbaa6cb0a81';
var _pre_sign = 'data={"productList":[{"product":"000000000000000040"},{"product":"000000000000000041"}]}' + '&url=' + _host + '/hansapi/test/product&appid=portal&securitykey=BXOBobOEy5BNJzGr&x-sap-timestamp=' + _unix_ts + '&x-sap-signature-nonce=' + _guid;
var _sign = CryptoJS.MD5(_pre_sign).toString();
postman.setGlobalVariable("_unix_ts", _unix_ts);
postman.setGlobalVariable("_guid", _guid);
postman.setGlobalVariable("_pre_sign", _pre_sign);
postman.setGlobalVariable("_sign", _sign);
版权声明:本文为YES开发框架网发布内容,转载请附上原文出处连接
post YES开发框架