lib/middleware/authentication.js
function getStringToSign(canonicalRequest) {
  return [
    canonicalRequest.method,
    canonicalRequest.contentMD5,
    canonicalRequest.contentType,
    canonicalRequest.timestamp,
    ...canonicalRequest.amzHeaders,
    canonicalRequest.querystring
      ? `${canonicalRequest.uri}?${canonicalRequest.querystring}`
      : canonicalRequest.uri
  ].join("\n");
}
function getStringToSign(canonicalRequest) {
  return [
    canonicalRequest.method,
    canonicalRequest.contentMD5,
    canonicalRequest.contentType,
    canonicalRequest.timestamp,
    ...canonicalRequest.amzHeaders,
    canonicalRequest.querystring
      ? `${canonicalRequest.uri}?${canonicalRequest.querystring}`
      : canonicalRequest.uri
  ].join("\n");
}
function getStringToSign ( canonicalRequest ) { return [ canonicalRequest . method , canonicalRequest . contentMD5 , canonicalRequest . contentType , canonicalRequest . timestamp , ... canonicalRequest . amzHeaders , canonicalRequest . querystring ? ` ${ canonicalRequest . uri } ${ canonicalRequest . querystring } ` : canonicalRequest . uri ] . join ( "\n" ) ; }
Generates a string to be signed for the specified signature version.

(currently only generates strings for V2 signing)

@param {*} canonicalRequest
Generates a string to be signed for the specified signature version .