<?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: HTTP Authentication w/ jQGrid</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/http-authentication-w-jqgrid</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/http-authentication-w-jqgrid/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>davidmirv on HTTP Authentication w/ jQGrid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/http-authentication-w-jqgrid#p3998</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/http-authentication-w-jqgrid#p3998</guid>
        	        	<description><![CDATA[<p>Hi All,</p>
<p>I just discovered JqGrid and have been working extensively with it for the last few days and have found these forums to be an invaluable source of information, so I thought I would give something back.</p>
<p>The following code can be used to HTTP Auth protect your JSON/XML/ i/o script.&#160;</p>
<p>First you must base64 encode the username:password like</p>
<p>var credentials = "&#60;?php echo base64_encode("myusername:secretpassword");?&#62; ";</p>
<p>In order to add the credentials into the request header you must implement the loadBeforeSendEvent in your jQGrid:</p>
</p>
<p>loadBeforeSend: function(xhr)</p>
<p><span> </span> &#160; &#160; {</p>
<p><span> </span> &#160; &#160; &#160;xhr.setRequestHeader("Authorization","Basic "+credentials);<br />&#160;&#160; &#160; return xhr;</p>
<p><span> </span> }&#160;</p>
<p>And thats it! it will login with the provided credentials! I believe if you wish to use Digest auth you just replace Basic with Digest but I am not 100% on that....</p>
</p>
<p>Thanks jQGrid Team, keep up the good work and thanks for a great widget!</p>
<p>David&#160;</p>
]]></description>
        	        	<pubDate>Fri, 16 Jan 2009 01:32:27 +0200</pubDate>
        </item>
</channel>
</rss>