-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Labels
InvestigateNeeds more investigation, before next steps can be defined.Needs more investigation, before next steps can be defined.bugSomething isn't workingSomething isn't workingquestion/validateFurther information or Validation is requested from the reporterFurther information or Validation is requested from the reporter
Description
We have the following logic in lib\auth\apikey.js
const aid = require('../aid');
class ApiKeyAuth {
constructor(settings) {
const params = settings.parameters();
const key = params.get('key');
const value = aid.evalString(params.get('value'));
if (params.get('in') === 'header') {
this.logic = '' + `config.headers['${key}'] = ${value};`;
} else {
this.logic = '' + `config.options['${key}'] = ${value};`;
}
}
}
module.exports = ApiKeyAuth;
I have my Postman collection auth defined like this:
A snippet from the json output from my exported collection:
"auth": {
"type": "apikey",
"apikey": [
{
"key": "value",
"value": "{{Authorization}}",
"type": "string"
},
{
"key": "key",
"value": "Authorization",
"type": "string"
}
]
},
It appears to be incorrectly using config.options instead of config.headers so my auth to fail when using the generated k6s output. If I manually change that part the auth works.
Perhaps something has changed in the output from Postman that's causing the line if (params.get('in') === 'header') { to not work as expected?
Here is my Postman version:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
InvestigateNeeds more investigation, before next steps can be defined.Needs more investigation, before next steps can be defined.bugSomething isn't workingSomething isn't workingquestion/validateFurther information or Validation is requested from the reporterFurther information or Validation is requested from the reporter

