I'm building a JSON RESTful API built with node.js and express.js,
the API will be accessed both by client side AJAX calls (from Ember.js) and by a native Android mobile app (standard HTTP requests).
I'm looking into two things:
1) authentication - how to know which user is accessing the API, in development I used an API key for each user and passed it in the request header
2) security - how to make sure only real authenticated users access private data.
are API keys a good strategy both for native mobile clients and for AJAX calls ? (user sends user+pass to the API and receives an API key, which is then used for creating additional requests)
should I be looking at something like OAUTH (1 or 2) ? I currently don't have plans for 3rd party applications to access the API so I don't need Authorization, but this can change in the future.
does it mean that I need to have my own OAUTH provider server ?