Skip to content

Commit

Permalink
save sso cache token expiresAt in UTC
Browse files Browse the repository at this point in the history
If the expiresAt field is saved with time zone (e.g. 2024-06-10T15:00:06-08:00) it will fail to load in certain SDKs such as the rust AWS SDK. To avoid this, ensure that it is always saved as a UTC format.
  • Loading branch information
clhuang authored and lucix-aws committed Jul 10, 2024
1 parent adab0de commit 60f7cd9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion credentials/ssocreds/sso_cached_token.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ func (r *rfc3339) UnmarshalJSON(bytes []byte) (err error) {
}

func (r *rfc3339) MarshalJSON() ([]byte, error) {
value := time.Time(*r).Format(time.RFC3339)
value := time.Time(*r).UTC().Format(time.RFC3339)

// Use JSON unmarshal to unescape the quoted value making use of JSON's
// quoting rules.
Expand Down

0 comments on commit 60f7cd9

Please sign in to comment.