forked from aws/aws-sdk-go
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use SharedCredentialsProvider instead of StaticProvider for shared cr…
…edentials Previously, we were using the StaticProvider for all credentials resolved while reading shared config files. There is logic in the AfterRetryHandler that marks a credential object as expired whenever an expired token exception occurs. When that happens, the ideal workflow is for the provider to trigger a credentials refresh by re-reading the profile file, but this is not possible with the StaticProvider. This commit addresses that problem by using the SharedCredentialsProvider instead of the StaticProvider when resolving such credentials. With this change, the SDK should automatically refreshes the credentials whenever we get a expired token exception from AWS. This should also implicitly address the feature requested in aws#1993, but instead of refreshing explicitly, the trigger here would be an exception from AWS.
- Loading branch information
1 parent
e635384
commit 7384cb9
Showing
5 changed files
with
38 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters