Simple PHP REST server with secure user authentica

2019-06-18 07:09发布

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

2条回答
别忘想泡老子
2楼-- · 2019-06-18 07:28

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/

查看更多
smile是对你的礼貌
3楼-- · 2019-06-18 07:35

You could try one of the OAuth libraries for PHP listed on http://oauth.net/code

查看更多
登录 后发表回答