How to pass authentication parameters in REST API?

Am using AJAX and a fragment controller. Am experiencing a UI Session Authentication error. How would you do authentication in AJAX?

Here is my discussion: Find Patient by Fingerprint - #12 by dkayiwa

@wyclif @lluismf