Skip to content

Commit 1b92154

Browse files
added signatureversion and expires params to api request
1 parent 496e0eb commit 1b92154

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cloudstack/cloudstack.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import (
3939
"strings"
4040
"time"
4141

42-
gomock "go.uber.org/mock/gomock"
42+
gomock "go.uber.org/mock/gomock"
4343
)
4444

4545
// UnlimitedResourceID is a special ID to define an unlimited resource
@@ -529,6 +529,8 @@ func (cs *CloudStackClient) newRawRequest(api string, post bool, params url.Valu
529529
params.Set("apiKey", cs.apiKey)
530530
params.Set("command", api)
531531
params.Set("response", "json")
532+
params.Set("signatureversion", "3")
533+
params.Set("expires", time.Now().UTC().Add(15*time.Minute).Format(time.RFC3339))
532534

533535
// Generate signature for API call
534536
// * Serialize parameters, URL encoding only values and sort them by key, done by EncodeValues

0 commit comments

Comments
 (0)