I'm looking into writing an PHP REST API that would allow registered users interact with the web service from third party applications.
What I need the API to be able to do is:
I was wondering what would be a good framework or library to start from that provides a good basis for such a service.
titel
Use HTTPS/TLS for REST APIs As one of the most critical practices, every API should implement HTTPS for integrity, confidentiality, and authenticity. In addition, security teams should consider using mutually authenticated client-side certificates that provide extra protection for sensitive data and services.
Rest API is an API that allows programmers to send and receive information from other programs using HTTP protocol commands such as GET and POST. Although REST API works with most protocols, it is specially designed for transmitting data through the HTTP protocol.
An Application Programming Interface, or API, defines the classes, methods, functions and variables that your application will need to call in order to carry out its desired task. In the case of PHP applications that need to communicate with databases the necessary APIs are usually exposed via PHP extensions.
Sounds like an OAuthProvider would do what you describe. Here are some tutorials on how to make an OAuthProvider using PHP's OAuth module.
http://toys.lerdorf.com/archives/55-Writing-an-OAuth-Provider-Service.html
http://djpate.com/2011/01/13/how-to-write-a-complete-oauth-provider-in-php5/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With