I am interested in creating an application that will provide an API service. Like Facebook, end developers will be able to register the application and receive personalized data to access the provided API through a third-party application. At the moment I want to provide PHP and JavaScript SDKs that will allow developers to access the API through a secure method (private-public keys).
I think I, more or less, understood a common understanding of how to approach this:
- Built-in REST server that processes requests,
- Built-in API server, which acts as a barrier between requests and the REST server (checking keys, permissions, etc.).
- The built-in JavaScript library, equivalent to Facebook "all.js", which is asynchronous to pages and can make API calls dynamically and performs validation on the API server.
In addition, I hope to use the API internally, i.e. make PUT / GET / POST / etc requests through an internal JavaScript file on the site itself.
I hope to use CodeIgniter as a base for launching the application, so if any suggestions on libraries, methods and approaches to this would be fantastic.
In particular, any reference to:
- SQL table structures for applications, scope queries, role-based permissions, sessions, logs, etc. etc.
- How to create / templates for the perfect JavaScript library that do the same thing as Facebook "all.js"
- Libraries that can authorize public and private keys
would be very helpful. I can't seem to find anything.
I know the following:
https://github.com/philsturgeon/codeigniter-restserver
Nonetheless,
which acts as a good template for developing an API, is not authenticated based on the database.
Any help is much appreciated!
source share