develop #1
@@ -39,7 +39,7 @@ export class RoleAuthManager {
|
|||||||
method.toUpperCase(),
|
method.toUpperCase(),
|
||||||
path,
|
path,
|
||||||
'',
|
'',
|
||||||
body || '',
|
'',
|
||||||
timestamp.toString(),
|
timestamp.toString(),
|
||||||
nonce
|
nonce
|
||||||
].join('\n');
|
].join('\n');
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export function generateSignature(
|
|||||||
timestamp: number,
|
timestamp: number,
|
||||||
nonce: string
|
nonce: string
|
||||||
): string {
|
): string {
|
||||||
const stringToSign = buildStringToSign(method, path, query, body, timestamp, nonce)
|
const stringToSign = buildStringToSign(method, path, query, '', timestamp, nonce)
|
||||||
|
|
||||||
const signature = CryptoJS.HmacSHA256(stringToSign, SIGNATURE_SECRET)
|
const signature = CryptoJS.HmacSHA256(stringToSign, SIGNATURE_SECRET)
|
||||||
const signatureBase64 = CryptoJS.enc.Base64.stringify(signature)
|
const signatureBase64 = CryptoJS.enc.Base64.stringify(signature)
|
||||||
|
|||||||
Reference in New Issue
Block a user