<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
	<title>jQuery Grid Plugin - jqGrid - Topic: OpenID with JQGrid running afoul of...?</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/openid-with-jqgrid-running-afoul-of</link>
	<description><![CDATA[Grid plugin]]></description>
	<generator>Simple:Press Version 5.7.5.3</generator>
	<atom:link href="http://www.trirand.com/blog/?page_id=393/help/openid-with-jqgrid-running-afoul-of/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>rickwayne on OpenID with JQGrid running afoul of...?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/openid-with-jqgrid-running-afoul-of#p26702</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/openid-with-jqgrid-running-afoul-of#p26702</guid>
        	        	<description><![CDATA[<p>It looks as if the anti-XSS stuff is indeed the culprit. From the OpenID Code users group, I already got the response quoted below.</p>
<p>And when I turn off "protect_from_forgery" in Rails, it goes through fine. So my question now becomes "how do I supply the correct header from my JQGrid POSTs?"</p>
<blockquote>
<div>Have you checked for the anti cross site request forgery header in the ajax request?&#160;</div>
<div>Rails won&#39;t accept post requests without that by default.</div>
</blockquote>
]]></description>
        	        	<pubDate>Thu, 31 May 2012 00:11:05 +0300</pubDate>
        </item>
        <item>
        	<title>rickwayne on OpenID with JQGrid running afoul of...?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/openid-with-jqgrid-running-afoul-of#p26701</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/openid-with-jqgrid-running-afoul-of#p26701</guid>
        	        	<description><![CDATA[<p>I have a Ruby on Rails 3 application which makes heavy use of JQGrid (for which, thanks!).</p>
<p>I&#39;m using ruby-openid to do authentication with Google, and used <a title="Rails with OpenID" href="http://blog.sethladd.com/2010/09/ruby-rails-openid-and-google.html" target="_blank">Seth Ladd&#39;s nice recipe</a> to get that working.</p>
<p>Which it does -- for page views and POSTS from web forms.</p>
<p>However, whenever JQGrid does a POST to update data on the server, two things happen:</p>
<ol>
<li>Even if the user&#39;s browser is already authenticated via logging in to Google, the POST appears to the server as if it were coming from an unauthenticated one, and gets redirected to the OpenID authentication dance. That wouldn&#39;t be a showstopper except that</li>
<li>&#160;As soon as the server sends back the 401 that&#39;s supposed to initiate the redirect-and-authenticate thing, the whole enchilada just stops dead. Normally (as in, say, a POST request from a form submission with a standard web page), the browser sees the 401, reads the enclosed "authenticate over here" info, does the dance, comes back with the session set up, and the cycle continues. But from JQuery/JQGrid...not so much.</li>
</ol>
<p>Any ideas? I&#39;m confident that I&#39;m missing something obvious here, but I&#39;ve got one of Rumsfeld&#39;s "unknown unknowns" going, I don&#39;t know what it is that I&#39;m missing, much less how to fix it! Seems like this should be a long-solved problem, eh?</p>
<p>I could be running afoul of XSS defenses, but if so I&#39;ve no idea how to proceed other than ****-canning the serious investment we&#39;ve already made in OpenID (including users already signing up &#38; having to furnish/remember passwords -- ick!).</p>
<p>Thanks in advance!</p>
<p>(Rails 3.0.7, ruby-openid 2.1.8, JQGrid 3.5.3, JQuery 1.3.2, using Google as the OP so that user never has to type in their identity URL.)</p>
]]></description>
        	        	<pubDate>Wed, 30 May 2012 23:50:23 +0300</pubDate>
        </item>
</channel>
</rss>