Simple Machines Community Forum

Customizing SMF => Bridges and Integrations => Topic started by: NFG on December 09, 2019, 08:48:34 AM

Title: DokuWiki, authPDO & Simple Machines
Post by: NFG on December 09, 2019, 08:48:34 AM
I've been bashing my head against this all night and I'm ready to admit I need help.

Dokuwiki has an AuthPDO (https://www.dokuwiki.org/plugin:authpdo) module for user authentication, and I've got code that pulls out the username, password hash and so on from SMF, but it constantly fails to match the wiki user's password with the hash in the SMF DB.  Now dokuwiki supports bcrypt, but I'm guessing it needs to understand the salt, and I'm having trouble making that part of it work when I don't understand the salt myself. 

Is password_salt in smf_members the actual salt used to generate the passwd hash?  Are those two elements plus the wiki user's plaintext password enough to authenticate the user?

And...  Can this be done in MySQL, so that I can return the user ID knowing these three things?  (select uid from smf_members where member_name = 'dave' and <password magic>) ?

Or am I doing this entirely wrong?  Happy to get an answer either way.  =)
Title: Re: DokuWiki & Simple Machines
Post by: NFG on December 09, 2019, 06:28:44 PM
Iit seems like SMF does way more work on the passwords than a simple MySQL query will work with.

But I found this:  https://github.com/realdigger/DokuWiki-SMF2-Authentication-Plugin

And it seems to work just fine.  So the question is moot.
Title: Re: DokuWiki, authPDO & Simple Machines
Post by: Rasim Aeon on December 21, 2019, 10:24:40 PM
How do you adjust the access and group assignments while using the smf auth.  Is there something that needs to be added in smf?