background preloader

PHP

Facebook Twitter

Nginx pres. High performance PHP framework. Writing an OAuth Provider Service. Last year I showed how to use pecl/oauth to write a Twitter OAuth Consumer.

Writing an OAuth Provider Service

But what about writing the other end of that? What if you need to provide OAuth access to an API for your site? How do you do it? Creating a PHP OAuth Server. If you’ve ever integrated with another API that requires security (such as Twitter), you’ve probably consumed an OAuth service.

Creating a PHP OAuth Server

In this article, I’ll explore what it takes to create your own three-legged OAuth server allowing you, for example, to create your own secure API which you can release publicly. When dealing with OAuth, you will typically see it implemented as a two-legged or three-legged OAuth server.