<?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: Getting phpBB to accept Django sessions</title>
	<atom:link href="http://www.gilesthomas.com/?feed=rss2&#038;p=63" rel="self" type="application/rss+xml" />
	<link>http://www.gilesthomas.com/?p=63</link>
	<description>Tech notes</description>
	<lastBuildDate>Tue, 13 Jul 2010 00:23:27 +0100</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Why do birds suddenly appear out of cantaloupes? That&#8217;s what I want to know .. &#171; Liblits News</title>
		<link>http://www.gilesthomas.com/?p=63&#038;cpage=1#comment-11935</link>
		<dc:creator>Why do birds suddenly appear out of cantaloupes? That&#8217;s what I want to know .. &#171; Liblits News</dc:creator>
		<pubDate>Fri, 23 Oct 2009 00:38:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.gilesthomas.com/?p=63#comment-11935</guid>
		<description>[...] The next step is to actually get single sign-on working with phpBB.  I&#8217;m following the guide here: http://www.gilesthomas.com/?p=63 [...]</description>
		<content:encoded><![CDATA[<p>[...] The next step is to actually get single sign-on working with phpBB.  I&#8217;m following the guide here: <a href="http://www.gilesthomas.com/?p=63" rel="nofollow">http://www.gilesthomas.com/?p=63</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: giles</title>
		<link>http://www.gilesthomas.com/?p=63&#038;cpage=1#comment-10511</link>
		<dc:creator>giles</dc:creator>
		<pubDate>Thu, 23 Jul 2009 17:11:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.gilesthomas.com/?p=63#comment-10511</guid>
		<description>Chris -- that&#039;s clever!  I&#039;d be interested in hearing how you (or anyone else who tries it) get on.</description>
		<content:encoded><![CDATA[<p>Chris &#8212; that&#8217;s clever!  I&#8217;d be interested in hearing how you (or anyone else who tries it) get on.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.gilesthomas.com/?p=63&#038;cpage=1#comment-10470</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Tue, 21 Jul 2009 12:04:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.gilesthomas.com/?p=63#comment-10470</guid>
		<description>Another, maybe simpler way to do this without creating new database models is to have your phpbb3 backend do an HTTP call (with curl for example) to a django page with the sessionid cookie set, and have that django page just display a JSON encoded list of the data you need (username, email) for the currently logged in user.</description>
		<content:encoded><![CDATA[<p>Another, maybe simpler way to do this without creating new database models is to have your phpbb3 backend do an HTTP call (with curl for example) to a django page with the sessionid cookie set, and have that django page just display a JSON encoded list of the data you need (username, email) for the currently logged in user.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Cage</title>
		<link>http://www.gilesthomas.com/?p=63&#038;cpage=1#comment-8756</link>
		<dc:creator>Jon Cage</dc:creator>
		<pubDate>Mon, 27 Apr 2009 09:54:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.gilesthomas.com/?p=63#comment-8756</guid>
		<description>I implemented something similar for a website I built a while back. I ended up sharing phpbb&#039;s auth system. It works fairly well aside from the fact that you have to log in through the forum side of things. There&#039;s really only one problem now - I couldn&#039;t find a neat way to return from logging into phpbb3 so you have to manually find your way back to where you were on the DJango side.

I&#039;ll give your suggestions a look - sounds like it might be a better solution!</description>
		<content:encoded><![CDATA[<p>I implemented something similar for a website I built a while back. I ended up sharing phpbb&#8217;s auth system. It works fairly well aside from the fact that you have to log in through the forum side of things. There&#8217;s really only one problem now &#8211; I couldn&#8217;t find a neat way to return from logging into phpbb3 so you have to manually find your way back to where you were on the DJango side.</p>
<p>I&#8217;ll give your suggestions a look &#8211; sounds like it might be a better solution!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pitflooff</title>
		<link>http://www.gilesthomas.com/?p=63&#038;cpage=1#comment-7122</link>
		<dc:creator>Pitflooff</dc:creator>
		<pubDate>Fri, 20 Mar 2009 12:59:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.gilesthomas.com/?p=63#comment-7122</guid>
		<description>very  intresting</description>
		<content:encoded><![CDATA[<p>very  intresting</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kookimebux</title>
		<link>http://www.gilesthomas.com/?p=63&#038;cpage=1#comment-2709</link>
		<dc:creator>kookimebux</dc:creator>
		<pubDate>Sun, 01 Feb 2009 18:11:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.gilesthomas.com/?p=63#comment-2709</guid>
		<description>Hello. And Bye. :)</description>
		<content:encoded><![CDATA[<p>Hello. And Bye. :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: giles</title>
		<link>http://www.gilesthomas.com/?p=63&#038;cpage=1#comment-2600</link>
		<dc:creator>giles</dc:creator>
		<pubDate>Fri, 23 Jan 2009 14:37:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.gilesthomas.com/?p=63#comment-2600</guid>
		<description>Argh, how annoying!  If it&#039;s any consolation, I didn&#039;t see those flaws either...</description>
		<content:encoded><![CDATA[<p>Argh, how annoying!  If it&#8217;s any consolation, I didn&#8217;t see those flaws either&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tiago A.</title>
		<link>http://www.gilesthomas.com/?p=63&#038;cpage=1#comment-2584</link>
		<dc:creator>Tiago A.</dc:creator>
		<pubDate>Wed, 21 Jan 2009 18:52:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.gilesthomas.com/?p=63#comment-2584</guid>
		<description>Yeah, but I kind of shot myself in the foot. Your solution is better. I didn&#039;t account for:
- password changes;
- when the user logs out from my main application;
- cleaning the cookies;

I&#039;ll change my solution someday :)

Tiago A.</description>
		<content:encoded><![CDATA[<p>Yeah, but I kind of shot myself in the foot. Your solution is better. I didn&#8217;t account for:<br />
- password changes;<br />
- when the user logs out from my main application;<br />
- cleaning the cookies;</p>
<p>I&#8217;ll change my solution someday :)</p>
<p>Tiago A.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: giles</title>
		<link>http://www.gilesthomas.com/?p=63&#038;cpage=1#comment-2491</link>
		<dc:creator>giles</dc:creator>
		<pubDate>Mon, 12 Jan 2009 16:55:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.gilesthomas.com/?p=63#comment-2491</guid>
		<description>Great to hear it works!  It&#039;s always good to have multiple solutions to a problem :-)


Cheers,

Giles</description>
		<content:encoded><![CDATA[<p>Great to hear it works!  It&#8217;s always good to have multiple solutions to a problem :-)</p>
<p>Cheers,</p>
<p>Giles</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tiago A.</title>
		<link>http://www.gilesthomas.com/?p=63&#038;cpage=1#comment-2489</link>
		<dc:creator>Tiago A.</dc:creator>
		<pubDate>Mon, 12 Jan 2009 14:39:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.gilesthomas.com/?p=63#comment-2489</guid>
		<description>Yes, and it worked too.

I just implemented and now it works fine. I found minor problems, but turned them around:

- I made phpBB accept the cookies of the main domain, e.g. mydomain.com instead of forum.mydomain.com. This is configurable in the administration page.
- I put the right info (expiration date, path, variable name and variable value) in the cookies. Every parameter is necessary.
- The user table on the phpBB side has a couple of &quot;weird fields&quot;, such an email hash field (concatenation of a CRC32 hash algorithm and the size of the email address), and all dates are the number of seconds since 1970. Also, phpBB3 uses a custom email hashing function, but it also works with an md5 hash.
- In the sessions table, I put the j2ee session key (lower cased) and the ip and the dates.

Looking again to what you did, yeah, it looks cleaner, but I don&#039;t regret my approach. I didn&#039;t change a bit in the phpBB side. I don&#039;t feel very comfortable with php code messing with my app&#039;s database, I prefer the other way around. Also it&#039;s working :), so I&#039;ll leave it at that.

Thanks,
Tiago A.</description>
		<content:encoded><![CDATA[<p>Yes, and it worked too.</p>
<p>I just implemented and now it works fine. I found minor problems, but turned them around:</p>
<p>- I made phpBB accept the cookies of the main domain, e.g. mydomain.com instead of forum.mydomain.com. This is configurable in the administration page.<br />
- I put the right info (expiration date, path, variable name and variable value) in the cookies. Every parameter is necessary.<br />
- The user table on the phpBB side has a couple of &#8220;weird fields&#8221;, such an email hash field (concatenation of a CRC32 hash algorithm and the size of the email address), and all dates are the number of seconds since 1970. Also, phpBB3 uses a custom email hashing function, but it also works with an md5 hash.<br />
- In the sessions table, I put the j2ee session key (lower cased) and the ip and the dates.</p>
<p>Looking again to what you did, yeah, it looks cleaner, but I don&#8217;t regret my approach. I didn&#8217;t change a bit in the phpBB side. I don&#8217;t feel very comfortable with php code messing with my app&#8217;s database, I prefer the other way around. Also it&#8217;s working :), so I&#8217;ll leave it at that.</p>
<p>Thanks,<br />
Tiago A.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
