Details
-
Bug
-
Status: Closed
-
Should
-
Resolution: Fixed
-
None
-
None
Description
According to the OpenAPI spec, the Security Definitions Object needs to be an object with nested Security Scheme Objects. Right now, we have the following top-level object:
{ swagger: "2.0", // stuff that probably isn't relevant securityDefinitions: { type: "basic", description: "HTTP basic access authentication using OpenMRS username and password" }, // stuff that probably isn't relevant }
We need to change this to:
{ swagger: "2.0", // stuff that probably isn't relevant securityDefinitions: { basic_auth: { type: "basic", description: "HTTP basic access authentication using OpenMRS username and password" } }, // stuff that probably isn't relevant }
Previous description
This error occurs when trying to log in. Reproduce as follows:
$ npm install openmrs.js $ node > OpenMRS = require('openmrs.js') > o = new OpenMRS() > o.login('admin', 'Admin123', 'https://demo.openmrs.org/openmrs')
→ Talk Reference
→ GitHub issue created by @willa