Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simple PHP REST server with secure user authentication and registered third party applications

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:

  • provide support for secure user authentication
  • allow registered users to interact with the service from 3rd party applications
  • this applications should be registered and approved on the system beforehand (similar to twitter)

I was wondering what would be a good framework or library to start from that provides a good basis for such a service.

titel

like image 410
titel Avatar asked Nov 08 '10 10:11

titel


People also ask

How do I make restful API secure?

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.

What is REST API PHP?

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.

What is API in PHP with example?

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.


1 Answers

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/

like image 97
Cat Avatar answered Sep 18 '22 04:09

Cat