REST API

I followed the tutorial - www.yiiframework.com/wiki/175/how-to-create-a-rest-api/ - to create my API and generally got it to work. However, I am having issues with authentication. Here’s how I am passing the username, password in the headers.


	$.ajax({

		url: "xxxx...",

		dataType: "json",

		method: "GET",

		headers: {

			'HTTP_X_USERNAME':'srini',

			'HTTP_X_PASSWORD':$.md5('srini')

		

		},

         etc... 



However, I am unable to get the username and password in the _checkAuth function. Anyone know what I am doing wrong?

Thanks!

Solved. I was missing the constant APPLICATION_ID in the HTTP_X_USERNAME and HTTP_X_PASSWORD. I had set the constant to ‘’, and it did not work. Once I had a value in there, it worked. Can anyone explain why that is a requirement?

Hello, I am having somewat the same problem. Can u please paste the the code of the client side working??