Skip to content

Commit

Permalink
Merge pull request #145 from gaonkar18y/for308-add-auth-to-verifyapikey
Browse files Browse the repository at this point in the history
140193349 add basic auth info to verifyApiKey call
  • Loading branch information
keyurkarnik authored Sep 27, 2019
2 parents 9dc7205 + df99dcb commit a39763e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions apikeys/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 8 additions & 0 deletions oauth/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,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) {
Expand Down

0 comments on commit a39763e

Please sign in to comment.