Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Create your username and password on your OpenMRS installation. For demo installation see here .
  2. Send http request to http://yourServer/security/authenticate. For demo http://46.101.51.199:8080/oweb/security/authenticate.
  3. The response in case of successful authentication will return a Http OK (200) code with details object. Otherwise response would be Http UNAUTHORIZED (401) code with no data.
  4. The response object would be a json document with two objects mappable to "user" and "locationlocations" of org.opensrp.api.domain.User and org.opensrp.api.domain.Location LocationTree respectively. The user represents complete user details like name, identifiers and other attributes associated, while location locations represents the area areas or health facility facilities the worker is responsible for. This is mapped by OpenMRS person attribute location with mapped location uuidLocation or Locations with ;; (double semicolon) separated location uuids or names.

If you donot want to get user or location details and just need to check whether credentials are valid or not, send http request to http://yourServer/authenticate-user . For demo http://46.101.51.199:8080/oweb/authenticate-user .

...