<?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/"
		>
<channel>
	<title>Comments on: Easy Rails API Authentication Using restful-authentication</title>
	<atom:link href="http://www.justinbritten.com/work/2009/05/rails-api-authentication-using-restful-authentication/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.justinbritten.com/work/2009/05/rails-api-authentication-using-restful-authentication/</link>
	<description>Ruby on Rails web application design, development and consulting</description>
	<lastBuildDate>Thu, 02 Feb 2012 13:45:40 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Concepcion Stockbridge</title>
		<link>http://www.justinbritten.com/work/2009/05/rails-api-authentication-using-restful-authentication/#comment-32340</link>
		<dc:creator>Concepcion Stockbridge</dc:creator>
		<pubDate>Wed, 31 Aug 2011 05:11:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.justinbritten.com/work/?p=224#comment-32340</guid>
		<description>@Offmid123 truly exactly where?</description>
		<content:encoded><![CDATA[<p>@Offmid123 truly exactly where?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard Szopa</title>
		<link>http://www.justinbritten.com/work/2009/05/rails-api-authentication-using-restful-authentication/#comment-29354</link>
		<dc:creator>Richard Szopa</dc:creator>
		<pubDate>Mon, 15 Aug 2011 21:17:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.justinbritten.com/work/?p=224#comment-29354</guid>
		<description>Unless you are using HTTPS, this recipe is *very* insecure. Anybody who has na ability to sniff out what are the HTTP requests done by your user will be able to see the API key and make requests on behalf of your user.</description>
		<content:encoded><![CDATA[<p>Unless you are using HTTPS, this recipe is *very* insecure. Anybody who has na ability to sniff out what are the HTTP requests done by your user will be able to see the API key and make requests on behalf of your user.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff Savin</title>
		<link>http://www.justinbritten.com/work/2009/05/rails-api-authentication-using-restful-authentication/#comment-13283</link>
		<dc:creator>Jeff Savin</dc:creator>
		<pubDate>Wed, 18 May 2011 17:48:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.justinbritten.com/work/?p=224#comment-13283</guid>
		<description>I rarely post a message stating how helpful snippets of code have been to my learning and/or use in development projects.  Your post, I couldn&#039;t bypass, however.  A great help!!!!  Thanks for taking the time to show this so succinctly.</description>
		<content:encoded><![CDATA[<p>I rarely post a message stating how helpful snippets of code have been to my learning and/or use in development projects.  Your post, I couldn&#8217;t bypass, however.  A great help!!!!  Thanks for taking the time to show this so succinctly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PEPE</title>
		<link>http://www.justinbritten.com/work/2009/05/rails-api-authentication-using-restful-authentication/#comment-10750</link>
		<dc:creator>PEPE</dc:creator>
		<pubDate>Thu, 28 Apr 2011 03:06:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.justinbritten.com/work/?p=224#comment-10750</guid>
		<description>Great post!!! 

How could I do to send thata api_key on the header?

I dont want sent that token by param I would like to do something like

curl http://localhost:3000/users -H &quot;api_key:my_appi_key&quot;</description>
		<content:encoded><![CDATA[<p>Great post!!! </p>
<p>How could I do to send thata api_key on the header?</p>
<p>I dont want sent that token by param I would like to do something like</p>
<p>curl <a href="http://localhost:3000/users" rel="nofollow">http://localhost:3000/users</a> -H &#8220;api_key:my_appi_key&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: d@Ve</title>
		<link>http://www.justinbritten.com/work/2009/05/rails-api-authentication-using-restful-authentication/#comment-10380</link>
		<dc:creator>d@Ve</dc:creator>
		<pubDate>Thu, 21 Apr 2011 14:32:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.justinbritten.com/work/?p=224#comment-10380</guid>
		<description>alican, did you ever resolve this issue? if not, anyone have further insight to plug this and christoph&#039;s security concerns? looking to implement this solution in the very near short-term.</description>
		<content:encoded><![CDATA[<p>alican, did you ever resolve this issue? if not, anyone have further insight to plug this and christoph&#8217;s security concerns? looking to implement this solution in the very near short-term.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rohan Dey</title>
		<link>http://www.justinbritten.com/work/2009/05/rails-api-authentication-using-restful-authentication/#comment-6853</link>
		<dc:creator>Rohan Dey</dc:creator>
		<pubDate>Sat, 05 Feb 2011 08:18:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.justinbritten.com/work/?p=224#comment-6853</guid>
		<description>You just made my day simpler. Thanks for sharing.</description>
		<content:encoded><![CDATA[<p>You just made my day simpler. Thanks for sharing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean</title>
		<link>http://www.justinbritten.com/work/2009/05/rails-api-authentication-using-restful-authentication/#comment-1084</link>
		<dc:creator>Sean</dc:creator>
		<pubDate>Tue, 31 Aug 2010 21:37:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.justinbritten.com/work/?p=224#comment-1084</guid>
		<description>Really helpful, thanks!</description>
		<content:encoded><![CDATA[<p>Really helpful, thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alican</title>
		<link>http://www.justinbritten.com/work/2009/05/rails-api-authentication-using-restful-authentication/#comment-170</link>
		<dc:creator>Alican</dc:creator>
		<pubDate>Wed, 21 Oct 2009 09:50:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.justinbritten.com/work/?p=224#comment-170</guid>
		<description>Thanks for tutorial, I implemented correctly and working so far but
I can access xmls without api key parameter passed.

I.e
/tasks.xml returning all tasks by XML format (need to asks for api key?)
/tasks.xml?api_key=randomkeyhere returning tasks by XML format normally

How can i restrict respond to xml blocks with only API key.
Regards.</description>
		<content:encoded><![CDATA[<p>Thanks for tutorial, I implemented correctly and working so far but<br />
I can access xmls without api key parameter passed.</p>
<p>I.e<br />
/tasks.xml returning all tasks by XML format (need to asks for api key?)<br />
/tasks.xml?api_key=randomkeyhere returning tasks by XML format normally</p>
<p>How can i restrict respond to xml blocks with only API key.<br />
Regards.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christoph Bünte</title>
		<link>http://www.justinbritten.com/work/2009/05/rails-api-authentication-using-restful-authentication/#comment-169</link>
		<dc:creator>Christoph Bünte</dc:creator>
		<pubDate>Mon, 24 Aug 2009 09:28:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.justinbritten.com/work/?p=224#comment-169</guid>
		<description>Thanx for sharing the code, it was pretty useful. But there is a security issue with the login_from_api_key method. The following finder finds a user, but it&#039;s supposed to find none: User.find_by_api_key(&#039;&#039;)

So any user can authenticate itself by leaving the api_key parameter value blank. This is how i do it:

def login_from_api_key
  self.current_user = User.valid.find_by_api_key(params[:api_key]) unless params[:api_key].blank?
end</description>
		<content:encoded><![CDATA[<p>Thanx for sharing the code, it was pretty useful. But there is a security issue with the login_from_api_key method. The following finder finds a user, but it&#8217;s supposed to find none: User.find_by_api_key(&#8221;)</p>
<p>So any user can authenticate itself by leaving the api_key parameter value blank. This is how i do it:</p>
<p>def login_from_api_key<br />
  self.current_user = User.valid.find_by_api_key(params[:api_key]) unless params[:api_key].blank?<br />
end</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alexandre Carvalho</title>
		<link>http://www.justinbritten.com/work/2009/05/rails-api-authentication-using-restful-authentication/#comment-168</link>
		<dc:creator>Alexandre Carvalho</dc:creator>
		<pubDate>Mon, 10 Aug 2009 23:33:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.justinbritten.com/work/?p=224#comment-168</guid>
		<description>Using:

 ./script/generate controller APIKeys

will give you some trouble because of the rails namings conventions

Use:

./script/generate controller ApiKeys

and you won&#039;t have any problem like the one with the helper.</description>
		<content:encoded><![CDATA[<p>Using:</p>
<p> ./script/generate controller APIKeys</p>
<p>will give you some trouble because of the rails namings conventions</p>
<p>Use:</p>
<p>./script/generate controller ApiKeys</p>
<p>and you won&#8217;t have any problem like the one with the helper.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

