I am in the process of designing an Erlang/OTP application which will expose its services (SOA) via a RESTful API.
The services, which comprise the backend will be a database service, a price calculation service, etc.
The clients can be of many types: a web client, mobile clients, an Asterisk server client (which needs to look up user records in the database service) and even the clients which I do not plan to have and do not know about yet. The clients will use the RESTful API differently: some will consume all the services, some will consume just some of the services (the SOA way).
The main concern that I have is the authentication/authorization.
I can not use the built-in authentication/authorization of Ruby on Rails, because the web-client is just the one client of many possible clients that will use the application via the RESTful API.
So, my question is:
- what is the general concept of authentication/authorization for a typical RESTful web application which is expected to be used with many different clients?
- what is the most practical software design pattern for authorization/authenication in a RESTful web application?
- what Erlang/OTP open source software libraries could you recommend to implement authentication/authorization for such an application?