Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPRiot.com:
Zend Framework 101: Zend_Oauth
Jul 06, 2010 @ 18:20:41

On PHPRiot.com Quentin Zervaas has posted the latest article in his "Zend Framework 101" series that talks about several of the more well-used components of the framework. This time he take a look at the Zend_Oauth component that allows your application to talk with remove OAuth service.

To demonstrate how to use this component, we're going to create a basic script that allows a user to log in to their Twitter account and post a status update. Twitter is currently phasing out "basic authentication" and requiring all third-party web and desktop applications use OAuth. This article can be used as a starting point for creating (or updating existing) Twitter API apps. We will also be using the Zend_Service_Twitter component, as I covered in a previous screencast.

He talks some about how OAuth works and how to use the component, along with Zend_Db, to create a simple comsumer script that connects to Twitter and posts a message to Twitter as the user that's authenticated.

tagged: zendframework zendoauth zenddb tutorial instroduction

Link:

Content with Style:
Linkedin and Zend_Oauth
May 07, 2010 @ 16:57:01

New from the Content with Style blog today there's a quick tutorial showing how to connect an application to LinkedIn with the Zend_Ouath component.

Matthias has made look into Linkedin and OAuth for a bit. This example was a very interesting read, but I think it's overcomplicating things slightly. That's why I want to show a very simple example inspired by what we've done for the brand new CwS Author pages.

His example sets up a few options, some for callbacks and others for general settings, and makes a new Zend_Oauth_Consumer object to pull in and connect the LinkedIn API to your application. He also includes a sample client that uses this connection to fetch the current status for the user in question.

tagged: zendoauth zendframework linkedin oauth tutorial

Link:

Padraic Brady's Blog:
Writing A Simple Twitter Client Using the PHP Zend Framework's OAuth Library
Jul 30, 2009 @ 15:59:59

Padraic Brady has posted a new tutorial to his blog about making a Twitter client using the Zend Framework's Zend_OAuth component for user validation.

During yesterday, I finally got around to patching and finishing Zend_Oauth's Consumer implementation for the OAuth Core 1.0 Revision A specification. Once I had it finished, I used it to write a quick and simple interface to post some Tweets on Twitter while I was testing it out. [...] In this article I'll explore how to writea quick Twitter client so you can post tweets (those short messages of less than 140 characters) once authorised across the OAuth protocol.

He starts of by explaining what OAuth is and how it can help provide a better level of authentication than just the usual username/password combo. His example code shows how to connect your OAuth provider's settings with the Zend_OAuth object and pass the request token over for authentication. You'll have to approve the mini-application to allow access to your Twitter account, but once you do, it should be smooth sailing.

tagged: oauth zendoauth component zendframework tutorial

Link:

Padraic Brady's Blog:
Another OAuth Library Is Born (Zend_OAuth Proposal)
Jun 23, 2008 @ 21:13:50

Padraic Brady has posted about another OAuth library that he's started up, one that's ready to be integrated with the Zend Framework reborn as a Zend_OAuth component (see his proposal code).

I've spent some time over the last week, and I have completed an initial pass at writing an OAuth Consumer in PHP5. I'm biased, but it's a nice chunk of code capable of fairly routine POST based OAuth requests using either an Authorized header, or a raw url encoded POST request body. My main remaining task is final cleanup, included refactoring, rolling my final set of acceptance tests into PHPUnit from SimpleTest, and adding support for HTTP GET, RSA, and a storage API so tokens can be saved in the background rather than outside the API.

Example code is included showing how to connect to the ma.gnolia bookmarking service and grabbing the response body from the request. He has a few more things to finish up before it's ready to go (backend storage, reworking the handling of web service API interaction, etc).

tagged: zendoauth oauth library zendframework component development

Link:

Padraic Brady's Blog:
Services_Oauth and Zend_Oauth Revisited
Jun 19, 2008 @ 15:21:57

Padraic Brady has gone back to a previous project, working with OAuth, and some thoughts on it and its possible implementation in both the Zend Framework and PEAR.

Starting yesterday, I opened up my IDE, updated PHPUnit, and got cracking. At the current rate of development a Consumer is likely at the weekend. I've already started writing up a formal proposal for PEAR and, of course, the Zend Framework also. I'm thankful the OAuth specification is this simple - it's one of the easiest to read specifications I've had to pleasure to work with.

He notes that an update to the API's Core (from 1.0 to 1.1) might be on the horizon, but can't see it affecting extensions/packages that much. He also mentions Extensions - not PHP extensions, these are augmentations to the OAuth core that allow for other different functionality to be included (like Discovery).

tagged: servicesoauth oauth zendframework zendoauth authentication

Link:


Trending Topics: