From df99dcb8d0d43a990f9744e216454ffe4b10b3be Mon Sep 17 00:00:00 2001 From: Yogesh Gaonkar Date: Thu, 19 Sep 2019 10:45:14 +0530 Subject: [PATCH] 140193349 add basic auth info to verifyApiKey call --- apikeys/index.js | 8 ++++++++ oauth/index.js | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/apikeys/index.js b/apikeys/index.js index 10a71e6..26aadd8 100644 --- a/apikeys/index.js +++ b/apikeys/index.js @@ -109,6 +109,14 @@ module.exports.init = function(config, logger, stats) { } }; + if( config.key && config.secret) { + api_key_options['auth']= { + user: config.key, + pass: config.secret, + sendImmediately: true + } + } + if (config.agentOptions) { if (config.agentOptions.requestCert) { api_key_options.requestCert = true; diff --git a/oauth/index.js b/oauth/index.js index 9cbfdf0..3d04a6c 100644 --- a/oauth/index.js +++ b/oauth/index.js @@ -171,6 +171,14 @@ module.exports.init = function(config, logger, stats) { 'x-dna-api-key': apiKey } }; + + if( config.key && config.secret) { + api_key_options['auth']= { + user: config.key, + pass: config.secret, + sendImmediately: true + } + } if (config.agentOptions) { if (config.agentOptions.requestCert) {