(url, data = {}, method = "POST")
| 229 | } |
| 230 | |
| 231 | signHeader(url, data = {}, method = "POST") { |
| 232 | const pathOnly = url.replace(/^http(s)?:\/\/.*?\//, "/"); |
| 233 | const secret = aesDecryptBase64(SIGN_SECRET_ENC); |
| 234 | const apiSign = sha1(`${pathOnly}${this.paramHash(data, method)}${this.token}${this.marsCid}${secret}`); |
| 235 | return `OAuth api_sign=${apiSign}`; |
| 236 | } |
| 237 | |
| 238 | signedHeaders(url, data) { |
| 239 | const cookie = this.cookie(); |
no test coverage detected