<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule">
<channel>
    <title>Maugrim The Reaper's Blog - PHP Security</title>
    <link>http://blog.astrumfutura.com/</link>
    <description>Pádraic Brady on PHP, PHP Game Development and More</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.1 - http://www.s9y.org/</generator>
    <pubDate>Tue, 22 Jul 2008 13:55:09 GMT</pubDate>

    <image>
        <url>http://blog.astrumfutura.com/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: Maugrim The Reaper's Blog - PHP Security - Pádraic Brady on PHP, PHP Game Development and More</title>
        <link>http://blog.astrumfutura.com/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>A Domain Specific Language for Behaviour Driven Development (BDD) in PHP</title>
    <link>http://blog.astrumfutura.com/archives/386-A-Domain-Specific-Language-for-Behaviour-Driven-Development-BDD-in-PHP.html</link>
            <category>PHP General</category>
            <category>PHP Security</category>
    
    <comments>http://blog.astrumfutura.com/archives/386-A-Domain-Specific-Language-for-Behaviour-Driven-Development-BDD-in-PHP.html#comments</comments>
    <wfw:comment>http://blog.astrumfutura.com/wfwcomment.php?cid=386</wfw:comment>

    <slash:comments>11</slash:comments>
    <wfw:commentRss>http://blog.astrumfutura.com/rss.php?version=2.0&amp;type=comments&amp;cid=386</wfw:commentRss>
    

    <author>nospam@example.com (Pádraic Brady)</author>
    <content:encoded>
    If you were expecting Part 19347 of the Zend Framework Blog Application Tutorial the next part is in writing &lt;img src=&quot;http://blog.astrumfutura.com/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;. For now though, to another topic.&lt;br /&gt;
&lt;br /&gt;
Back at the start of the year I started making early releases of &lt;a href=&quot;http://www.phpspec.org&quot;&gt;PHPSpec&lt;/a&gt; a Behaviour-Driven Development (BDD) library for PHP. Regular readers are aware I pretty much left the scene for a few months, so it&#039;s about time I got back to it!&lt;br /&gt;
&lt;br /&gt;
PHPSpec implements a domain specific language (DSL) in PHP for specifying the behaviour of functional units such as methods and objects. The purpose of a DSL was to move away from the xUnit style declaration of tests towards a specification language centred on describing behaviour. I&#039;ve written about BDD previously, so I won&#039;t cover the same ground here in this haphazard entry. The current PHPSpec is sufficiently usable that I&#039;ve covered most of the original goals. For example, a simple spec in PHPSpec could be:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;php&quot; style=&quot;text-align: left&quot;&gt;&lt;span style=&quot;color: #b1b100;&quot;&gt;require_once&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;Bowling.php&#039;&lt;/span&gt;; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// contains Bowling class&lt;/span&gt;&lt;br /&gt;&amp;#160;&lt;br /&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;class&lt;/span&gt; DescribeNewBowlingGame extends PHPSpec_Context&lt;br /&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160;&lt;br /&gt;&amp;#160; &amp;#160; private &lt;span style=&quot;color: #0000ff;&quot;&gt;$_bowling&lt;/span&gt; = &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;null&lt;/span&gt;;&lt;br /&gt;&amp;#160;&lt;br /&gt;&amp;#160; &amp;#160; public &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; before&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #0000ff;&quot;&gt;$this&lt;/span&gt;-&amp;gt;_bowling = &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;new&lt;/span&gt; Bowling;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&amp;#160;&lt;br /&gt;&amp;#160; &amp;#160; public &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; itShouldScore0ForGutterGame&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #b1b100;&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$i&lt;/span&gt;=&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;; &lt;span style=&quot;color: #0000ff;&quot;&gt;$i&lt;/span&gt;&amp;lt;=&lt;span style=&quot;color: #cc66cc;&quot;&gt;20&lt;/span&gt;; &lt;span style=&quot;color: #0000ff;&quot;&gt;$i&lt;/span&gt;++&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #0000ff;&quot;&gt;$this&lt;/span&gt;-&amp;gt;_bowling-&amp;gt;&lt;span style=&quot;color: #006600;&quot;&gt;hit&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #0000ff;&quot;&gt;$this&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color: #006600;&quot;&gt;spec&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$this&lt;/span&gt;-&amp;gt;_bowling-&amp;gt;&lt;span style=&quot;color: #006600;&quot;&gt;score&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color: #006600;&quot;&gt;should&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color: #006600;&quot;&gt;equal&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&amp;#160;&lt;br /&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
I hate to be the one to admit it, but this sucks in many ways. The primary culprit is PHP itself. In BDD a specification of this order should be human readable, to the point, free of ambiguity and not require any programming experience if possible to understand. PHP syntax scores badly on all four. Now don&#039;t get up in arms - I love PHP to bits, warts and all &lt;img src=&quot;http://blog.astrumfutura.com/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;. But once the warts demand compromises in what I want from a domain specific language I have to consider looking elsewhere.&lt;br /&gt;
&lt;br /&gt;
Unless PHP miraculously adopts the syntax of Ruby, I&#039;m therefore willing to concede defeat at some level. Ruby DSL&#039;s are sexy, PHP DSL&#039;s are verbose and clumsy.&lt;br /&gt;
&lt;br /&gt;
My proposal therefore is to re-implement the current programming language DSL as a specification language - i.e. a new (extremely limited and narrow!) language capable of being parsed by PHPSpec into its PHP equivelant. This is certainly something of a drastic step but I&#039;m close to being convinced it&#039;s a worthwhile endeavor that would still leave people free to fall back on the PHP DSL if they really dislike it &lt;img src=&quot;http://blog.astrumfutura.com/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;.&lt;br /&gt;
&lt;br /&gt;
To be clear on what I mean by a specification language - it&#039;s a language with it&#039;s own independently defined syntax which is designed to solve a specific problem as opposed to the one size fits all approach of general programming languages. Implementing such a limited language in PHP is easy - you just need to keep it tight, focused, and limited in scope. We&#039;re not out to implement Python in PHP are we? &lt;img src=&quot;http://blog.astrumfutura.com/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
Bearing in mind the original spec in PHP, here&#039;s one possible specification DSL example along the same lines:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;require_once Bowling.php&lt;br /&gt;
 &lt;br /&gt;
describe &quot;new bowling game&quot; {&lt;br /&gt;
 &lt;br /&gt;
    before {&lt;br /&gt;
        bowling = new Bowling&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    it &quot;should score 0 for gutter game&quot; {&lt;br /&gt;
        bowling-&gt;hit(0) times(20)&lt;br /&gt;
        bowling-&gt;score should == 0&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
}&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
The differences are obvious but subtle. The similarity to closures is deliberate - it&#039;s a simple construct to copy from (and has nice braces). PHP syntax elements that I consider unnecessary are removed. Some are retained rather than replaced - let&#039;s stick with PHP&#039;s conventions insofar as they make parsing, and learning, the DSL simpler. The individual space delimited terms on each line would each be individually parsed, and translated to a specific effect. times(20) replaces the for loop, == replaces an equal() call, and whatever follows an == is an obvious parameter. The flow of terms marks a new grammer which is deliberately ordered to resemble natural English.&lt;br /&gt;
&lt;br /&gt;
I&#039;m being very brief here but hopefully you&#039;re still following my train of thought.&lt;br /&gt;
&lt;br /&gt;
There are of course the usual concerns. Is it performant? Won&#039;t IDEs be incapable of code completion? Obviously IDEs won&#039;t recognise this without help (surely there&#039;s enough TextMate/PDT/Other users to create solutions or suggestions though). Performance obviously suffers unless some caching is introduced or the parsing rules are really tight, and there is a final translated PHP form being executed afterall.&lt;br /&gt;
&lt;br /&gt;
Aside from the obvious improvement to readability there are other benefits. In BDD behaviours can be thought of as being discrete sharable units. Four methods from three classes could each share the same behaviour in theory. Rather than duplicate the spec across three class descriptions - why not specify the shared behaviour in one spec, and tell other descriptions to integrate it as being shared. If you think that through (hint: composition) have a go at considering how to implement it in PHP. Then consider how a possible implementation would work within PHP. It gets complicated depending on how you figure it.&lt;br /&gt;
&lt;br /&gt;
Using a specification DSL, we can simply ignore the existence of classes in PHP (well, the pretense is nice &lt;img src=&quot;http://blog.astrumfutura.com/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;). Instead the DSL would incorporate a syntax for denoting shared behaviours - and leave the parser free to implement nested behaviours behind the scenes in whatever manner best fits PHP. Another potentially confusing task a user can safely not worry about so long as they write the DSL.&lt;br /&gt;
&lt;br /&gt;
I should stress I&#039;m not aiming to completely replace the PHP DSL - it will still exist, but the specification language option would offer more features and benefits with far less overhead in terms of PHP code to write (and staheholders to possibly try reading!).&lt;br /&gt;
&lt;br /&gt;
I&#039;m throwing this all out for comment. I haven&#039;t seen much connection between DSLs and PHP so anyone&#039;s experience here would be really great to hear about too.  
    </content:encoded>
    <dc:creator>P&#225;draic Brady</dc:creator>

    <pubDate>Fri, 18 Jul 2008 17:27:21 +0000</pubDate>
    <guid isPermaLink="false">http://blog.astrumfutura.com/archives/386-guid.html</guid>
    <category>bdd</category>
<category>behaviour-driven development</category>
<category>maugrim</category>
<category>php general</category>
<category>php security</category>
<category>phpspec</category>
<category>tdd</category>
<category>unit testing</category>
<creativeCommons:license>http://creativecommons.org/licenses/by/1.0/</creativeCommons:license>
</item>
<item>
    <title>Google roll out OAuth Authorisation to all Google Data APIs</title>
    <link>http://blog.astrumfutura.com/archives/385-Google-roll-out-OAuth-Authorisation-to-all-Google-Data-APIs.html</link>
            <category>PHP General</category>
            <category>PHP Security</category>
            <category>Zend Framework</category>
    
    <comments>http://blog.astrumfutura.com/archives/385-Google-roll-out-OAuth-Authorisation-to-all-Google-Data-APIs.html#comments</comments>
    <wfw:comment>http://blog.astrumfutura.com/wfwcomment.php?cid=385</wfw:comment>

    <slash:comments>3</slash:comments>
    <wfw:commentRss>http://blog.astrumfutura.com/rss.php?version=2.0&amp;type=comments&amp;cid=385</wfw:commentRss>
    

    <author>nospam@example.com (Pádraic Brady)</author>
    <content:encoded>
    Last Thursday I saw this turn up on the OAuth mailing list, so I&#039;ve spent a few hours over the weekend adding the final features to the OAuth For PHP library (proposed both to the Zend Framework and PEAR) to ensure it works. Thanks go out to David Koblas for his unprompted assistance to go test the library and uncover the remaining issues!&lt;br /&gt;
&lt;br /&gt;
The actual announcement went out on one of the Google Blogs: &lt;a href=&quot;http://googledataapis.blogspot.com/2008/06/oauth-for-google-data-apis.html&quot;&gt;http://googledataapis.blogspot.com/2008/06/oauth-for-google-data-apis.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I&#039;m currently rolling these changes into a new OAuth 0.0.3 release for the PEAR proposal (an arduous task which involves opening the command line and running &quot;phing convert-to-pear&quot; on a subversion export of the ZF base code &lt;img src=&quot;http://blog.astrumfutura.com/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;). Once that hits the proposal I&#039;ll switch into voting mode and see what comments the always insightful PEAR developers drop on top of me. Of course this means the changes are already in the matching Zend Framework Proposal respository at &lt;a href=&quot;http://svn.astrumfutura.org/zendframework/trunk&quot;&gt;http://svn.astrumfutura.org/zendframework/trunk&lt;/a&gt; along with examples of its usage with the Ma.gnolia API and the Google Data APIs waiting for its future Zend review.&lt;br /&gt;
&lt;br /&gt;
The OAuth Consumer is now hitting the point where I&#039;d rate it as beta. Most of the absolutely neccessary features are finished, and could likely only do with a touch of the refactoring brush. The last major feature is implementing a backend storage solution for OAuth tokens.&lt;br /&gt;
&lt;br /&gt;
The Google Data API support comes with a few gotchas. Its documentation show a clear preference for using GET instead of POST, though the Google OAuth server does appear to natively support POST requests for everything with the exception that it has a small bug which interprets an empty POST request body as a sort of phantom empty parameter which messes up the validation of a Client&#039;s RSA-SHA1 signature. Other then that it&#039;s ready to go. Might be time to add comments to my code...&lt;img src=&quot;http://blog.astrumfutura.com/templates/default/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;. The bug has been reported but it&#039;s still preferable to stick with GET requests unless the Google OAuth documentation ever specifies it as an option.&lt;br /&gt;
&lt;br /&gt;
If all goes well, the dual proposal process across PEAR and the Zend Framework should make for a another good OAuth library in PHP. Next up in the near future when an OAuth Server is also implemented will be adding support for some common OAuth Extensions - talk of these is already accelerating on the mailing lists as discussions turn to the next iteration of the OAuth Core Specification which has taken on the name OAuth Core 2008.1 (a sort of dual date + revision number system).&lt;br /&gt;
&lt;br /&gt;
For those watching the PEAR proposal, I&#039;ll roll out OAuth 0.0.3 to the proposal during tomorrow. The last two have been unstable at best while on the drawing board so this near-stable one should be a stark contrast since it works without any hitches.  
    </content:encoded>
    <dc:creator>P&#225;draic Brady</dc:creator>

    <pubDate>Mon, 30 Jun 2008 21:24:43 +0000</pubDate>
    <guid isPermaLink="false">http://blog.astrumfutura.com/archives/385-guid.html</guid>
    <category>oauth</category>
<category>pear</category>
<category>php</category>
<category>php general</category>
<category>php security</category>
<category>zend framework</category>
<category>zf proposal</category>
<creativeCommons:license>http://creativecommons.org/licenses/by/1.0/</creativeCommons:license>
</item>
<item>
    <title>OAuth For PHP Status Update...</title>
    <link>http://blog.astrumfutura.com/archives/383-OAuth-For-PHP-Status-Update....html</link>
            <category>PHP General</category>
            <category>PHP Security</category>
            <category>Zend Framework</category>
    
    <comments>http://blog.astrumfutura.com/archives/383-OAuth-For-PHP-Status-Update....html#comments</comments>
    <wfw:comment>http://blog.astrumfutura.com/wfwcomment.php?cid=383</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.astrumfutura.com/rss.php?version=2.0&amp;type=comments&amp;cid=383</wfw:commentRss>
    

    <author>nospam@example.com (Pádraic Brady)</author>
    <content:encoded>
    Edit: Firefox 3 appeared to have auto filled in a password option on this entry previously - my apologies and here&#039;s the full entry!&lt;br /&gt;
&lt;br /&gt;
Earlier today I finished up work on the initial OAuth library. It has a few rough edges and missing features, but the bulk of the work for an OAuth Consumer is there. The rest is refactoring, feature iteration, and testing.&lt;br /&gt;
&lt;br /&gt;
The new library is specifically targeted as a dual-proposal. It has been proposed to both PEAR and the Zend Framework. Rather than maintaining two distinct versions, or one distinct version with a heavy dose of abstraction, both are derived from the Zend Framework version. In essence, I develop primarily on the Zend Framework version, iterate patches onto a simple Phing task-chain, and out comes the PEAR version. This extends itself into the test suite too. This allows me to use the same base code, with changes appropriate to the underlying system (e.g. using PEAR HTTP_Request instead of ZF Zend_Http_Request).&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://framework.zend.com/wiki/pages/viewpage.action?pageId=37957&quot;&gt;The Zend Framework Proposal&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://pear.php.net/pepr/pepr-proposal-show.php?id=512&quot;&gt;The PEAR Proposal&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Comments to both are more than welcome. For anyone wishing to ask questions outside of these proposal processes, I have also established a mailing list on Google Groups for the &quot;OAuth For PHP&quot; project: &lt;a href=&quot;http://groups.google.com/group/oauth-for-php&quot;&gt;http://groups.google.com/group/oauth-for-php&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Over the weekend I posted a quick example of using the Zend_Oauth component to retrieve data from Ma.gnolia&#039;s API, a similar example using the PEAR code is available at &lt;a href=&quot;http://code.google.com/p/oauth-for-php/source/browse/trunk/docs/examples/magnolia.php&quot;&gt;PEAR OAuth Ma.gnolia Example&lt;/a&gt;. If nothing else it highlights what remains to be done. Don&#039;t get me wrong - you could almost use the current code, but there is a lot of support that can be added to make use easier.&lt;br /&gt;
&lt;br /&gt;
So what is remaining?&lt;br /&gt;
&lt;br /&gt;
The initial library remained tightly focused on implementing OAuth across HTTP POST. Obviously this means GET is left languishing by the wayside for now. One of the reasons was simply that a narrow focus also has the benefit of simplifying testing. And what works with POST URL query strings, should apply similarly to GET requests.&lt;br /&gt;
&lt;br /&gt;
Secondly, there is absolutely no backend storage medium available as yet. In the examples, I temporarily stored all tokens to the Session. Ideally I will implement both a File and DB based storage backend this week.&lt;br /&gt;
&lt;br /&gt;
Thirdly, the workflow of an actual Web Service API interaction is externalised. There is no way to get the OAuth library to handle requests to web services internally, using a specialised OAuth client, automatically making authorised POST/GET requests with the relevant data. Rather you can extract the OAuth authorisation parameters as a Header or Query String value for use in any HTTP client you wish (perhaps not perfectly ideal but the flexibility won&#039;t tie you to any particular client implementation either &lt;img src=&quot;http://blog.astrumfutura.com/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;).&lt;br /&gt;
&lt;br /&gt;
Fourthly, support for RSA signing is omitted. Technically there is a problem supporting PHP&#039;s openssl extension on two fronts. The first is that PEAR&#039;s Crypt_RSA is a slower native implementation of RSA which doesn&#039;t optionally offload work on ext/openssl. The second is that ext/openssl itself is a tricky extension - it&#039;s API is badly documented (one of the worst), and it tends to have BC issues across different PHP versions. &lt;br /&gt;
&lt;br /&gt;
Lastly, there is no OAuth Server just yet! A Server is next on my agenda though, so expect it to commence development almost immediately.&lt;br /&gt;
&lt;br /&gt;
The end goal however, is substantially closer than it was last week! We have code, tests and a working example. The community feedback channel is now open.  
    </content:encoded>
    <dc:creator>P&#225;draic Brady</dc:creator>

    <pubDate>Wed, 25 Jun 2008 00:21:00 +0000</pubDate>
    <guid isPermaLink="false">http://blog.astrumfutura.com/archives/383-guid.html</guid>
    <category>maugrim</category>
<category>oauth</category>
<category>pear</category>
<category>php</category>
<category>php general</category>
<category>php security</category>
<category>yadis</category>
<category>zend framework</category>
<category>zf proposal</category>
<creativeCommons:license>http://creativecommons.org/licenses/by/1.0/</creativeCommons:license>
</item>
<item>
    <title>Another OAuth Library Is Born</title>
    <link>http://blog.astrumfutura.com/archives/382-Another-OAuth-Library-Is-Born.html</link>
            <category>Openid and Yadis</category>
            <category>PHP General</category>
            <category>PHP Security</category>
            <category>Zend Framework</category>
    
    <comments>http://blog.astrumfutura.com/archives/382-Another-OAuth-Library-Is-Born.html#comments</comments>
    <wfw:comment>http://blog.astrumfutura.com/wfwcomment.php?cid=382</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.astrumfutura.com/rss.php?version=2.0&amp;type=comments&amp;cid=382</wfw:commentRss>
    

    <author>nospam@example.com (Pádraic Brady)</author>
    <content:encoded>
    I&#039;ve spent some time over the last week, and I have completed an initial pass at writing an OAuth Consumer in PHP5. I&#039;m biased, but it&#039;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.&lt;br /&gt;
&lt;br /&gt;
I wrote up a quick example script using the current source code - bear in mind the final API will be tweaked but this is a close match for what I&#039;d expect to become final (I&#039;ll await community feedback before finalising anything!).&lt;br /&gt;
&lt;br /&gt;
You can grab the code, which is geared up for integration into the Zend Framework as a Zend_Oauth component, from my proposals repository at &lt;a href=&quot;http://svn.astrumfutura.org/zendframework/trunk/&quot;&gt;http://svn.astrumfutura.org/zendframework/trunk/&lt;/a&gt; (proposed components are in /trunk/library/Proposed). I fully expect to refactor a similar core library specifically for use with PEAR in the very near future.&lt;br /&gt;
&lt;br /&gt;
Onwards with the example! I&#039;m using the &lt;a href=&quot;http://ma.gnolia.com&quot;&gt;Ma.gnolia bookmarking service&#039;s&lt;/a&gt; API (version 2) here. If you intend actually running the example, you will need to create a Ma.gnolia account and visit &lt;a href=&quot;http://ma.gnolia.com/applications/new&quot;&gt;http://ma.gnolia.com/applications/new&lt;/a&gt; to register an application to get hold of an OAuth Consumer Key. Registering an application is a bit confusing - but basically create an imaginary one (e.g. &quot;Super Duper OAuth Test Application&quot;. Since you&#039;ll be the only user for now, you can use it across any OAuth testing regardless of application name. In the code, replace CONSUMER_KEY and CONSUMER_KEY_SECRET strings with the real thing.&lt;br /&gt;
&lt;br /&gt;
The example isn&#039;t explained here - if you&#039;re unfamiliar with OAuth I&#039;ll explain it better in the future when this is all closer to completion. For now refer to the &lt;a href=&quot;http://oauth.net/core/1.0/&quot;&gt;OAuth Core 1.0 Specification&lt;/a&gt; (the starting sections are pretty good at explaining things). The amount of code is indicative of features being wrapped around the existing API as they are not yet integrated directly (e.g. using Sessions to store temporary tokens instead of an internally referenced database). Also note that the example creates a new Access Key every single request (generally the annoyance of authorising yourself every time doesn&#039;t exist in a completed solution &lt;img src=&quot;http://blog.astrumfutura.com/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;).&lt;br /&gt;
&lt;br /&gt;
What does the example do? Simply checks how many bookmarks members of the OAuth Ma.gnolia Group have saved. Think it was 126 or so. The printed response is XML.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;php&quot; style=&quot;text-align: left&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;?php&lt;/span&gt;&lt;br /&gt;&lt;a href=&quot;http://www.php.net/session_start&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;session_start&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #b1b100;&quot;&gt;require_once&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;Zend/Oauth/Consumer.php&#039;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$options&lt;/span&gt; = &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;requestScheme&#039;&lt;/span&gt; =&amp;gt; Zend_Oauth::&lt;span style=&quot;color: #006600;&quot;&gt;REQUEST_SCHEME_HEADER&lt;/span&gt;,&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;version&#039;&lt;/span&gt; =&amp;gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;1.0&#039;&lt;/span&gt;, &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// there is only a 1.0 version for now &amp;lt;img src=&amp;quot;/templates/default/img/emoticons/wink.png&amp;quot; alt=&amp;quot;;-)&amp;quot; style=&amp;quot;display: inline; vertical-align: bottom;&amp;quot; class=&amp;quot;emoticon&amp;quot; /&amp;gt;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;signatureMethod&#039;&lt;/span&gt; =&amp;gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;HMAC-SHA1&#039;&lt;/span&gt;,&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;localUrl&#039;&lt;/span&gt; =&amp;gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;http://path/to/this/file.php&#039;&lt;/span&gt;, &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// change to this file&#039;s local URL&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;requestTokenUrl&#039;&lt;/span&gt; =&amp;gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;http://ma.gnolia.com/oauth/get_request_token&#039;&lt;/span&gt;,&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;userAuthorisationUrl&#039;&lt;/span&gt; =&amp;gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;http://ma.gnolia.com/oauth/authorize&#039;&lt;/span&gt;,&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;accessTokenUrl&#039;&lt;/span&gt; =&amp;gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;http://ma.gnolia.com/oauth/get_access_token&#039;&lt;/span&gt;,&lt;br /&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// replace with your own real application consumer key and key secret!&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$consumer&lt;/span&gt; = &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;new&lt;/span&gt; Zend_Oauth_Consumer&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;CONSUMER_KEY&#039;&lt;/span&gt;, &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;CONSUMER_KEY_SECRET&#039;&lt;/span&gt;, &lt;span style=&quot;color: #0000ff;&quot;&gt;$options&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;!&lt;a href=&quot;http://www.php.net/isset&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;isset&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$_SESSION&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;ACCESS_TOKEN&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;!&lt;a href=&quot;http://www.php.net/empty&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;empty&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$_GET&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #0000ff;&quot;&gt;$token&lt;/span&gt; = &lt;span style=&quot;color: #0000ff;&quot;&gt;$consumer&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color: #006600;&quot;&gt;getAccessToken&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$_GET&lt;/span&gt;, &lt;a href=&quot;http://www.php.net/unserialize&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;unserialize&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$_SESSION&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;REQUEST_TOKEN&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #0000ff;&quot;&gt;$_SESSION&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;ACCESS_TOKEN&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt; = &lt;a href=&quot;http://www.php.net/serialize&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;serialize&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$token&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt; &lt;span style=&quot;color: #b1b100;&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #0000ff;&quot;&gt;$token&lt;/span&gt; = &lt;span style=&quot;color: #0000ff;&quot;&gt;$consumer&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color: #006600;&quot;&gt;getRequestToken&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #0000ff;&quot;&gt;$_SESSION&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;REQUEST_TOKEN&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt; = &lt;a href=&quot;http://www.php.net/serialize&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;serialize&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$token&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #0000ff;&quot;&gt;$consumer&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color: #006600;&quot;&gt;redirect&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt; &lt;span style=&quot;color: #b1b100;&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #0000ff;&quot;&gt;$token&lt;/span&gt; = &lt;a href=&quot;http://www.php.net/unserialize&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;unserialize&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$_SESSION&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;ACCESS_TOKEN&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #0000ff;&quot;&gt;$_SESSION&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;ACCESS_TOKEN&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt; = &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;null&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$methodUrl&lt;/span&gt; = &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;http://ma.gnolia.com/api/rest/2/bookmarks_count&#039;&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$rawData&lt;/span&gt; = &lt;span style=&quot;color: #0000ff;&quot;&gt;$token&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color: #006600;&quot;&gt;toQueryString&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$methodUrl&lt;/span&gt;, &lt;span style=&quot;color: #0000ff;&quot;&gt;$consumer&lt;/span&gt;, &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;group&#039;&lt;/span&gt;=&amp;gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;oauth&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$client&lt;/span&gt; = &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;new&lt;/span&gt; Zend_Http_Client;&lt;br /&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$client&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color: #006600;&quot;&gt;setUri&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$methodUrl&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$client&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color: #006600;&quot;&gt;setMethod&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;Zend_Http_Client::&lt;span style=&quot;color: #006600;&quot;&gt;POST&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$client&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color: #006600;&quot;&gt;setRawData&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$rawData&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$response&lt;/span&gt; = &lt;span style=&quot;color: #0000ff;&quot;&gt;$client&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color: #006600;&quot;&gt;request&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&lt;a href=&quot;http://www.php.net/header&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;header&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;Content-Type: &#039;&lt;/span&gt; . &lt;span style=&quot;color: #0000ff;&quot;&gt;$response&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color: #006600;&quot;&gt;getHeader&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;Content-Type&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&lt;a href=&quot;http://www.php.net/echo&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;echo&lt;/span&gt;&lt;/a&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;$response&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color: #006600;&quot;&gt;getBody&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
You can comment on the formal Zend Framework proposal for a Zend_Oauth at &lt;a href=&quot;http://framework.zend.com/wiki/pages/viewpage.action?pageId=37957&quot;&gt;http://framework.zend.com/wiki/pages/viewpage.action?pageId=37957&lt;/a&gt;.  
    </content:encoded>
    <dc:creator>P&#225;draic Brady</dc:creator>

    <pubDate>Sat, 21 Jun 2008 20:40:56 +0000</pubDate>
    <guid isPermaLink="false">http://blog.astrumfutura.com/archives/382-guid.html</guid>
    <category>oauth</category>
<category>openid</category>
<category>openid and yadis</category>
<category>pear</category>
<category>php</category>
<category>php general</category>
<category>php security</category>
<category>zend framework</category>
<category>zf proposal</category>
<creativeCommons:license>http://creativecommons.org/licenses/by/1.0/</creativeCommons:license>
</item>

</channel>
</rss>