Open tribbettz opened 8 years ago
Tried playing with this locally and successfully generated a token and was able to communicate without u/p thereafter. HUZZAH! Obviously this will be a bit of work to remove all u/p code and replace with tokens but when we're ready it'll work :)
Try it yourself if you'd like: Generate the cookie:
curl -u username:password -i 'https://emr.addisclinic.org/openmrs/ws/rest/v1/session'
Then pass the cookie with each subsequent call:
curl --cookie JSESSIONID=TOKEN -i 'https://emr.addisclinic.org/openmrs/ws/rest/v1/concept?limit=2'
End a session by sending a DELETE call to ws/rest/v1/session endpoint
Change user/password requests to tokenizations from OpenMRS. This will need to be coordinated with Albert on the client side as well. https://wiki.openmrs.org/display/docs/REST+Web+Services+API+For+Clients