Skip to content

Commit

Permalink
Session token must be included if used in signing
Browse files Browse the repository at this point in the history
Continue to supply session token when included as part of signature. 

See department-stockholm#12
  • Loading branch information
zenchicken authored Jan 7, 2020
1 parent 8766478 commit 401f637
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ exports.createPresignedURL = function(

// when a session token must NOT be "signed" into the canonical request
// (needed for some services, such as IoT)
if (options.sessionToken && !options.signSessionToken) {
if (options.sessionToken && options.signSessionToken) {
query["X-Amz-Security-Token"] = options.sessionToken;
} else {
delete query["X-Amz-Security-Token"];
Expand Down

0 comments on commit 401f637

Please sign in to comment.