<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Dodgeball Cannon &#187; oauth</title>
	<atom:link href="http://www.johntantalo.com/blog/tag/oauth/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.johntantalo.com/blog</link>
	<description>It's not so much a time machine as it is my blog.</description>
	<lastBuildDate>Thu, 05 Aug 2010 17:40:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Short and sweet OAuth</title>
		<link>http://www.johntantalo.com/blog/short-and-sweet-oauth/</link>
		<comments>http://www.johntantalo.com/blog/short-and-sweet-oauth/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 05:28:37 +0000</pubDate>
		<dc:creator>John Tantalo</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.johntantalo.com/blog/?p=94</guid>
		<description><![CDATA[I recently grew quite frustrated when I had to update Emend&#8217;s Twitter bot to use OAuth.
There are, of course, readily available implementations of OAuth in python, even some specifically engineered for App Engine with lovely persistence and caching and KILL ME NOW.
I gave up after a couple hours of staring at this nonsense. I grew [...]]]></description>
			<content:encoded><![CDATA[<p>I recently grew quite frustrated when I had to update <a href="http://emendapp.com">Emend&#8217;s</a> Twitter bot to use <a href="http://oauth.net/">OAuth</a>.</p>
<p>There are, of course, <a href="http://oauth.googlecode.com/svn/code/python/oauth/oauth.py">readily available implementations of OAuth</a> in python, even some <a href="http://github.com/mikeknapp/AppEngine-OAuth-Library/raw/master/oauth.py">specifically engineered for App Engine</a> with lovely persistence and caching and KILL ME NOW.</p>
<p>I gave up after a couple hours of staring at this nonsense. I grew so displeased because my app doesn&#8217;t need 95% of what these libraries offer. I only need to <a href="http://oauth.net/core/1.0/#signing_process">sign requests</a> with a fixed <em>oauth_consumer_key</em>, <em>oauth_consumer_secret</em>, <em>oauth_token</em>, and <em>oauth_token_secret</em>. However, this simple task would require me to subclass or instantiate several object with Culver&#8217;s library, and I can&#8217;t even begin to fathom what I&#8217;d need to do with Knapp&#8217;s offering.</p>
<p>(Aside: if you want to authorize and build access tokens for your app, I highly recommend <a href="http://term.ie/oauth/example/client.php">this excellent OAuth test client</a>)</p>
<p>I finally teased apart the core function of signing requests, thanks in large part to the <a href="http://oauth.net/core/1.0/#anchor30">great reference example</a>. If all you need is to access a protected resource, this will get the job done with a single function call, no object-orientation required.</p>
<p><script src="http://gist.github.com/284452.js?file=oauth.py"></script></p>
<p><a href="http://gist.github.com/284452">Source code and unit test of short and sweet OAuth.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.johntantalo.com/blog/short-and-sweet-oauth/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
