[dokuwiki] Re: phpBB3 auth with DokuWiki 2010-11-07 "Anteater"

  • From: Carsten Fuchs <CarstenFuchs@xxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Tue, 01 Feb 2011 01:58:24 +0100

Hi all,

unfortunately I never got a reply to my previous message, quoted below for 
reference.

I now managed to write an own auth plugin that is very simple, but doesn't suffer from all the problems of the one at [1] and works very well here. You can "see" it live / in action at my website at http://www.cafu.de

Unfortunately, it's also so simple (and specific, i.e. not easily generalized for everyones need) that I barely dare to publish it somewhere, but the key idea is as follows:

Implement only DokuWiki's auth methods checkPass() and getUserData(), which use cUrl to download the result of another php script that is passed the username and password as parameters and whose output is "ok" and the users email address if valid, else an HTTP 401 response. The called php script is a tiny phpbb3-specific script that checks the given username and password and composes the response.

Encapsulated in this way, there is neither a problem with computing the phpbb3 password hash with custom non-phpbb3 code (because the best way to do check phpbb3 credentials is just to use the phpbb3 code itself), nor are there any name clashes with the internals of DokuWiki, as is the case in abundance in solution [1]. In fact, this solution even works if your phpbb3 and dokuwiki installations are on different hosts. It also deliberately avoids using HTTP Auth, as that is not supported by all hosters (certainly not by mine).

If anyone is interested, please let me know, I'm happy to share my scripts.  :-)

Best regards,
Carsten


[1]  http://www.dokuwiki.org/tips:integrate_with_phpbb3



Am 2010-11-14 15:33, schrieb Carsten Fuchs:
Hi all,

I've been using DokuWiki with the phpBB3 authentication integration at
http://www.dokuwiki.org/tips:integrate_with_phpbb3
but it stopped working after I upgraded from 2009-12-25c "Lemming" to 2010-11-07 
"Anteater":
"Fatal error: Call to a member function sql_query() on a non-object in
/homepages/18/d28239263/htdocs/ca3de/forum/includes/cache.php on line 51"
(unfortunately there are no other frames of the call stack provided).

There is a remark at the above page:
"Note that it does not function any more after the merge of the
[[http://github.com/splitbrain/dokuwiki/commit/d7879495eef6e6a998f5d727304e88dfa5420108|requireall
branch]] on 2010-03-12."

Somebody added another note near the bottom of the page:
"I found a solution to make it work with the most recent version of dokuwiki. 
You basically have
to declare the global variables before the class is declared."
followed by some code, but that it very vague (which version did the author 
really refer to?).


I'm not particularly familiar with the DokuWiki and phpBB3 code, so I was 
wondering if someone
sees an obvious problem with the combination of the phpBB3 integration with the 
new DokuWiki
release, and could help with a fix, or a hint, etc.

Many thanks and best regards,
Carsten





--
   Cafu - the open-source Game and Graphics Engine
for multiplayer, cross-platform, real-time 3D Action
          Learn more at http://www.cafu.de

Other related posts: