lib/mongo/auth/aws/request.rb
# Returns the canonical request used during calculation of AWS V4
# signature.
#
# @return [ String ] The canonical request.
Returns the canonical request used during calculation of AWS V4
signature.
Returns the canonical request used during calculation of AWS V4 signature .
def canonical_request
          headers = headers_to_sign
          serialized_headers = headers.map do |k, v|
            "#{k}:#{v}"
          end.join("\n")
          hashed_payload = Digest::SHA256.new.update(STS_REQUEST_BODY).hexdigest
          "POST\n/\n\n" +
            "#{serialized_headers}\n\n" +
            "#{signed_headers_string}\n" +
            hashed_payload
        end
def canonical_request headers = headers_to_sign serialized_headers = headers . map do | k , v | "#{k}:#{v}" end . join ( "\n" ) hashed_payload = Digest :: SHA256 . new . update ( STS_REQUEST_BODY ) . hexdigest "POST\n/\n\n" + "#{serialized_headers}\n\n" + "#{signed_headers_string}\n" + hashed_payload end
Returns the canonical request used during calculation of AWS V4
signature.
Returns the canonical request used during calculation of AWS V4 signature .
# There are two newlines after serialized headers because the # signature V4 specification treats each header as containing the # terminating newline, and there is an additional newline # separating headers from the signed header names.
The canonical request.
The canonical request .
 String 