medic / cht-interoperability

CHT - eCHIS interoperability project
GNU Affero General Public License v3.0
2 stars 3 forks source link

Failure authenticating against openhim-core using openhim-mediator-utils version 0.4.0 #118

Open njuguna-n opened 6 months ago

njuguna-n commented 6 months ago

When trying to register a mediator in openhim-core it fails with Failed to register the mediator! AxiosError: Request failed with status code 401. More context in slack.

njuguna-n commented 6 months ago

The latest version uses genAuthHeaders to authenticate the registration request. The documentation mentions that This can only be used after the .authenticate() function has been called for this user. which I don't think is happening. Calling the authenticate function before the registration call does not solve it so looking into alternative solutions.