From 8cdc6a9ad02da61234e7d18db77294cef31367da Mon Sep 17 00:00:00 2001 From: Ryan Kohler Date: Mon, 25 Jan 2021 12:05:44 -0800 Subject: [PATCH] update name change --- google/internal/externalaccount/aws.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/google/internal/externalaccount/aws.go b/google/internal/externalaccount/aws.go index fd3d682..906d1fe 100644 --- a/google/internal/externalaccount/aws.go +++ b/google/internal/externalaccount/aws.go @@ -26,20 +26,20 @@ type awsRequestSigner struct { } const ( - // AWS Signature Version 4 signing algorithm identifier. +// AWS Signature Version 4 signing algorithm identifier. awsAlgorithm = "AWS4-HMAC-SHA256" - // The termination string for the AWS credential scope value as defined in - // https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html +// The termination string for the AWS credential scope value as defined in +// https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html awsRequestType = "aws4_request" - // The AWS authorization header name for the security session token if available. +// The AWS authorization header name for the security session token if available. awsSecurityTokenHeader = "x-amz-security-token" - // The AWS authorization header name for the auto-generated date. +// The AWS authorization header name for the auto-generated date. awsDateHeader = "x-amz-date" - awsTimeFormatLong = "20060102T150405Z" + awsTimeFormatLong = "20060102T150405Z" awsTimeFormatShort = "20060102" ) @@ -203,14 +203,14 @@ func (rs *awsRequestSigner) generateAuthentication(req *http.Request, timestamp serviceName = splitHost[0] } - credentialScope := fmt.Sprintf("%s/%s/%s/%s", dateStamp, rs.RegionName, serviceName, awsRequestType) + credentialScope := fmt.Sprintf("%s/%s/%s/%s",dateStamp, rs.RegionName, serviceName, awsRequestType) requestString, err := canonicalRequest(req, canonicalHeaderColumns, canonicalHeaderData) if err != nil { return "", err } requestHash, err := getSha256([]byte(requestString)) - if err != nil { + if err != nil{ return "", err } @@ -221,7 +221,7 @@ func (rs *awsRequestSigner) generateAuthentication(req *http.Request, timestamp dateStamp, rs.RegionName, serviceName, awsRequestType, stringToSign, } { signingKey, err = getHmacSha256(signingKey, []byte(signingInput)) - if err != nil { + if err != nil{ return "", err } }