<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Simple Webmachine Extension (2/4): Authorization</title>
	<atom:link href="http://blog.beerriot.com/2009/04/23/simple-webmachine-authorization/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.beerriot.com/2009/04/23/simple-webmachine-authorization/</link>
	<description>The making of BeerRiot and other thoughts.</description>
	<lastBuildDate>Fri, 02 Dec 2011 02:06:46 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Bryan</title>
		<link>http://blog.beerriot.com/2009/04/23/simple-webmachine-authorization/#comment-1490</link>
		<dc:creator><![CDATA[Bryan]]></dc:creator>
		<pubDate>Thu, 07 May 2009 17:17:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.beerriot.com/?p=134#comment-1490</guid>
		<description><![CDATA[Hey, Pablo.  Just to echo Justin - yes, webmachine checks to see if you&#039;ve defined is_authorized/2, and uses a default if you haven&#039;t.

In the implementation of is_authorized, it&#039;s absolutely possible to query some authorization repository, or any other completely arbitrary set of parameters (file existence, time of day, random bit stream, ...).  It&#039;s a function - compute what you want.  :)

And yes, if it makes sense for your app, it&#039;s a great idea to put your auth code in a module that can be called from the is_authorized of many different resources.  Reuse through modularity for the win!]]></description>
		<content:encoded><![CDATA[<p>Hey, Pablo.  Just to echo Justin &#8211; yes, webmachine checks to see if you&#8217;ve defined is_authorized/2, and uses a default if you haven&#8217;t.</p>
<p>In the implementation of is_authorized, it&#8217;s absolutely possible to query some authorization repository, or any other completely arbitrary set of parameters (file existence, time of day, random bit stream, &#8230;).  It&#8217;s a function &#8211; compute what you want.  <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>And yes, if it makes sense for your app, it&#8217;s a great idea to put your auth code in a module that can be called from the is_authorized of many different resources.  Reuse through modularity for the win!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin Sheehy</title>
		<link>http://blog.beerriot.com/2009/04/23/simple-webmachine-authorization/#comment-1489</link>
		<dc:creator><![CDATA[Justin Sheehy]]></dc:creator>
		<pubDate>Thu, 07 May 2009 14:45:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.beerriot.com/?p=134#comment-1489</guid>
		<description><![CDATA[Pablo,

The is_authorized function is one of the many Webmachine Resource Functions, all documented at http://bitbucket.org/justin/webmachine/wiki/WebmachineResources

The table on that page shows the default values for each of those functions which will be used if your resource function does not export it.

It is definitely possible (and not very hard) to do all of the things you ask, including checking auth with a database, using a single central auth function, and so on.  However, Webmachine is a Web toolkit and not a framework -- it makes no claims to know better than you what the &quot;right&quot; way is to make such application-specific decisions.]]></description>
		<content:encoded><![CDATA[<p>Pablo,</p>
<p>The is_authorized function is one of the many Webmachine Resource Functions, all documented at <a href="http://bitbucket.org/justin/webmachine/wiki/WebmachineResources" rel="nofollow">http://bitbucket.org/justin/webmachine/wiki/WebmachineResources</a></p>
<p>The table on that page shows the default values for each of those functions which will be used if your resource function does not export it.</p>
<p>It is definitely possible (and not very hard) to do all of the things you ask, including checking auth with a database, using a single central auth function, and so on.  However, Webmachine is a Web toolkit and not a framework &#8212; it makes no claims to know better than you what the &#8220;right&#8221; way is to make such application-specific decisions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pablop</title>
		<link>http://blog.beerriot.com/2009/04/23/simple-webmachine-authorization/#comment-1488</link>
		<dc:creator><![CDATA[pablop]]></dc:creator>
		<pubDate>Thu, 07 May 2009 13:28:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.beerriot.com/?p=134#comment-1488</guid>
		<description><![CDATA[Enjoying your posts about webmachine.

How does webmachine knows about is_authorized?
Does it check if it exists and exported and use it otherwise assume no auth is required?

Is it possible to authenticate users against credentials stored in a db and keep a session cookie?
Can I keep the actual auth code in one place and only call it from all the resources if required? Where is the right place to put such auth backend?

Thanks]]></description>
		<content:encoded><![CDATA[<p>Enjoying your posts about webmachine.</p>
<p>How does webmachine knows about is_authorized?<br />
Does it check if it exists and exported and use it otherwise assume no auth is required?</p>
<p>Is it possible to authenticate users against credentials stored in a db and keep a session cookie?<br />
Can I keep the actual auth code in one place and only call it from all the resources if required? Where is the right place to put such auth backend?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>

