Webservice: How To Handle Authentication ?

I need a very very simple webservice given a string as output.

This could be very easy in Yii, as documented in definitive guide, but my question is : how to handle username and password?

this webservice requires authentication. because action is under RBAC role restritions.

as you need a webservice, probably best way will be http basic auth (for example: http://www.yiiframework.com/extension/httpauth/)

I don’t want an extension, I want to learn how to do this with Yii.

so look at that extension code…

LOL ! +1

what is so funny? Didn’t it helped? It is just very simple filter you may apply on particular controller or application wide.