Skip to content

Commit

Permalink
Fix version data type and time format
Browse files Browse the repository at this point in the history
Signed-off-by: Noel Georgi <[email protected]>
  • Loading branch information
frezbo committed Oct 10, 2018
1 parent d15847e commit 7e03b6b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cli/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type ExecCommandInput struct {
}

type AwsCredentialHelperData struct {
Version string `json:"Version"`
Version int `json:"Version"`
AccessKeyID string `json:"AccessKeyId"`
SecretAccessKey string `json:"SecretAccessKey"`
SessionToken string `json:"SessionToken"`
Expand Down Expand Up @@ -133,13 +133,13 @@ func ExecCommand(app *kingpin.Application, input ExecCommandInput) {

if input.CredentialHelper {
credentialData := AwsCredentialHelperData{
Version: "1",
Version: 1,
AccessKeyID: val.AccessKeyID,
SecretAccessKey: val.SecretAccessKey,
SessionToken: val.SessionToken,
}
if !input.NoSession {
credentialData.Expiration = time.Now().Add(input.Duration).Format("2006-01-02T15:04:05")
credentialData.Expiration = time.Now().Add(input.Duration).Format("2006-01-02T15:04:05Z")
}
json, err := json.Marshal(&credentialData)
if err != nil {
Expand Down

0 comments on commit 7e03b6b

Please sign in to comment.