Skip to content

Commit 8f2486e

Browse files
authored
chore: signature v4 prefix use consts (#338)
1 parent ec90319 commit 8f2486e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

signature_v4.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ import (
55
"crypto/sha256"
66
"encoding/hex"
77
"fmt"
8-
"github.com/pkg/errors"
98
"net/url"
109
"sort"
1110
"strconv"
1211
"strings"
1312
"time"
13+
14+
"github.com/pkg/errors"
1415
)
1516

1617
const (
@@ -247,5 +248,5 @@ func (s *SignerV4) buildSigningKey(accessKeySecret, region, date string) ([]byte
247248
}
248249

249250
func (s *SignerV4) buildAuthorization(accessKeyID, signature, scope string) string {
250-
return fmt.Sprintf("SLS4-HMAC-SHA256 Credential=%s/%s,Signature=%s", accessKeyID, scope, signature)
251+
return fmt.Sprintf("%s Credential=%s/%s,Signature=%s", authorizationAlgorithmV4, accessKeyID, scope, signature)
251252
}

0 commit comments

Comments
 (0)