PHP OAuth 1.0 Library that handles an api key/secret pair and endpoints (request,authorization,and access)

試著忘記壹切 提交于 2019-12-06 06:17:36

Facebook uses OAuth 2.0 so it's API is out of the question. Check here for some basic API references - BitBucket, Twitter and Yahoo all use v1.0a for example.

PHP has an OAuth Extension so if you're building a custom solution you should definitely start there. The library that you're referencing does provide Two Legged OAuth so on a first glance it does seem as an option for you. Disclaimer on the last sentence: I haven't used this library however I checked the documentation. A nice explanation with UML sequence charts can be found here. It is just general OAuth not PHP specific but does provide a nice deep explanation. This GitHub repo contains reusable clients for my services - you can also get some ideas from there if your clients are going to be PHP.

Your case seems very interesting and there is no full answer to your question. If I were you I'd first take the time to check the code behind the Google Code oauth-php library that you reference in the Two-Legged Section (and not only). Then decide if you should in fact use this library, another or a custom implementation. You may also have other requirements/showstoppers that may affect your decision (I know you'd be wanting to push some big amounts of data from your other question. ;) ) The 2 hour token is a good performance optimization but is it too long of an authentication/authorization lease?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!