Skip to content

Commit

Permalink
Removed comments
Browse files Browse the repository at this point in the history
Signed-off-by: Bandini Bhopi <bandinib@amazon.com>
  • Loading branch information
bandinib-amzn committed Feb 29, 2024
1 parent 5160450 commit a357109
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion lib/Transport.js
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ class Transport {
Object.assign({}, params.querystring, options.querystring)
);
}
if (this._auth !== undefined) {
if (this._auth !== null && typeof this._auth === 'object' && 'credentials' in this._auth) {
params.auth = this._auth;
}

Expand Down
9 changes: 0 additions & 9 deletions lib/aws/AwsSigv4Signer.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,7 @@ function AwsSigv4Signer(opts = {}) {
console.log(`credentialsState.credentials = ${JSON.stringify(credentialsState.credentials)}`);
request.region = awssigv4Cred.region;
request.service = awssigv4Cred.service;

console.log(
`Does auth present in request? ===> ${
request['auth'] ? 'YES. Please delete once job is done' : 'NO'
}`
);
delete request['auth'];
console.log(
`Have auth deleted from request successfully? ===> ${request['auth'] ? 'NO' : 'YES'}`
);
}
const signed = aws4.sign(request, credentialsState.credentials);
signed.headers['x-amz-content-sha256'] = crypto
Expand Down
4 changes: 2 additions & 2 deletions test/unit/lib/aws/awssigv4signer.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ test('Basic aws sdk v3 when token expires later than `requestTimeout` ms in the
});
});

test('Should create child client (auth check)', (t) => {
test('Should create child client', (t) => {
t.plan(8);
const childClientCred = {
auth: {
Expand Down Expand Up @@ -689,7 +689,7 @@ test('Should create child client (auth check)', (t) => {
child.on('request', (err, { meta }) => {
debug('Count', count);
if (count === 0) {
t.equal(JSON.stringify(meta.request.params.auth), 'null');
t.equal(JSON.stringify(meta.request.params.auth), undefined);
} else if (count === 1) {
t.equal(JSON.stringify(meta.request.params.auth), JSON.stringify(childClientCred.auth));
} else if (count === 2) {
Expand Down

0 comments on commit a357109

Please sign in to comment.