I use a very simple approach:
- define an access profile with its unique accessId and accessKey (e.g. MD5 hashed GUID value)
- store such access profile in database
- every request (GET/POST/etc.) must supply accessId, queryHash (MD5 hash value represents the query) and signature (MD5 hash value of queryHash + accessKey). Of course the client needs keep the accessKey in a secure place!!!
- server gets the request will check the accessId and the signature using the same calculation algorithm to reject or grant the access (authenticate)
- further authorization can be done on request type basis utilizing the access profile
the service with this approach using the new ASP.NET MVC web API can serve whatever type of client: browser/javascript and native(desktop or mobile) etc.