Skip to content

Commit 7774d21

Browse files
authored
Merge pull request #192 from bobisjan/credentials-session-token
Provide session token to credentials
2 parents 4472896 + 9c07bf9 commit 7774d21

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/s3.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,18 @@ module.exports = CoreObject.extend({
5050
accessKeyId: accessKeyId,
5151
secretAccessKey: secretAccessKey,
5252
};
53+
54+
if (sessionToken) {
55+
this.plugin.log('Using AWS session token from config', { verbose: true });
56+
s3Options.credentials.sessionToken = sessionToken;
57+
}
5358
}
5459

5560
if (signatureVersion) {
5661
this.plugin.log('Using signature version from config', { verbose: true });
5762
s3Options.signatureVersion = signatureVersion;
5863
}
5964

60-
if (sessionToken) {
61-
this.plugin.log('Using AWS session token from config', { verbose: true });
62-
s3Options.sessionToken = sessionToken;
63-
}
64-
6565
if (profile && !this.plugin.readConfig('s3Client')) {
6666
this.plugin.log('Using AWS profile from config', { verbose: true });
6767
s3Options.credentials = fromIni({ profile: profile });

0 commit comments

Comments
 (0)