<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Fri, 24 May 2013 14:19:39 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Lorna Mitchell's Blog: Using OAuth2 for Google APIs with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17752</guid>
      <link>http://www.phpdeveloper.org/news/17752</link>
      <description><![CDATA[<p>
<i>Lorna Mitchell</i> has <a href="http://www.lornajane.net/posts/2012/using-oauth2-for-google-apis-with-php">a new post</a> to her blog today showing how to use the functionality provided by the <a href="http://pecl.php.net/package/pecl_http">pecl_http</a> extension to make an OAuth2 connection to Google.
</p>
<blockquote>
I've written about Google and OAuth before, but that was OAuth v1.0, and they are introducing OAuth2 for their newer APIs; in this example I was identifying myself in order to use the Google Plus API. [...] OAuth 2 doesn't need an extension or any particular library as it doesn't have the signing component that OAuth 1 had, and OAuth 2 also has fewer round trips. It does require SSL however, because the requests are in the clear.
</blockquote>
<p>
She includes some code snippets with an example of a connection - making a request to the remote HTTPS resource, adding some parameters to the URL (including the response type, your client ID and a redirect url). The response then contains the "code" value you'll need to make the second request to fetch the access token you'll need on future requests. You can find out more about the interface she's accessing in <a href="https://developers.google.com/+/api/">these docs</a> about the Google Plus API.
</p>]]></description>
      <pubDate>Thu, 29 Mar 2012 12:02:21 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Phil Sturgeon's Blog: NinjAuth: The Social Integration Package PHP has been dying for]]></title>
      <guid>http://www.phpdeveloper.org/news/16872</guid>
      <link>http://www.phpdeveloper.org/news/16872</link>
      <description><![CDATA[<p>
New on his blog <i>Phil Sturgeon</i> has a post about the <a href="http://philsturgeon.co.uk/blog/2011/09/ninjauth-social-integration-php">social integration package PHP has been dying for</a> - <a href="https://github.com/philsturgeon/fuel-ninjauth">NinjAuth</a>. It has hooks for OAuth and OAuth2 connections and makes it simple to use them completely abstracted.
</p>
<blockquote>
In the past I have never needed to implement oAuth into a PHP project. I have done it in Rails and boy it was easy thanks to OmniAuth. <a href="https://github.com/intridea/omniauth">OmniAuth</a> abstracts away so much of the grunt work that it takes about 5 minutes to add a new social network to your site, and 4 of those minutes are spent signing up for the API keys. What options do we have in the world of PHP? A bunch of screwy hacks or provider specific classes like TwitterOAuth. I don't want to hunt down 20 libraries with different methods, I want to get a key, bang it in and go to the pub. Well, now I can!
</blockquote>
<p>
The <a href="https://github.com/philsturgeon/fuel-ninjauth>NinjaAuth</a> system allows a user to have multiple "authentications" groups under it corresponding to various social networking sites. It uses the <a href="https://github.com/fuel-packages/fuel-oauth">fuel-oauth</a> and <a href="https://github.com/fuel-packages/fuel-oauth2">fuel-oauth2</a> packages to drive its backend. He includes <a href="http://philsturgeon.co.uk/blog/2011/09/ninjauth-social-integration-php">a code snippet</a> showing how to configure the providers (complete with keys needed for auth) including Facebook, Flickr, GitHub, YouTube and - of course - Twitter. You can grab the latest version of this library from <a href="https://github.com/philsturgeon/fuel-ninjauth">Phil's github account</a>.
</p>]]></description>
      <pubDate>Mon, 19 Sep 2011 08:59:31 -0500</pubDate>
    </item>
  </channel>
</rss>
