plugin:authmysql:nuked-klan
Table of Contents
Nuked Klan
Configuration for authMySQL Auth plugin to authenticate with Nuked Klan, which let's do:
- Only basic authentication
- No user modification/adding. This assumes that all user/group accounts will be created and maintained through Nuked Klan.
Configuration
Use the Config Manager or add it to the conf/local.protected.php
to store the config protected.
Remind to replace the table prefix (here nk_
) with yours.
- conf/local.protected.php
<?php /** * Nuked Klan configuration for MySQL Auth Plugin * See https://www.dokuwiki.org/plugin:mysql:nuked-klan for details and explanation */ /***********************************************************************/ /* Basic SQL statements for user authentication (required) */ /***********************************************************************/ /* This statement is used to grant or deny access to the wiki. The result * should be a table with exact one line containing at least the password * of the user. If the result table is empty or contains more than one * row, access will be denied. * * The module access the password as 'pass' so a alias might be necessary. * * Following patters will be replaced: * %{user} user name * %{pass} encrypted or clear text password (depends on 'encryptPass') * %{dgroup} default group name */ $conf['auth']['mysql']['checkPass'] = "SELECT pass FROM nk_users AS u WHERE pseudo='%{user}'"; /* This statement should return a table with exact one row containing * information about one user. The field needed are: * 'pass' containing the encrypted or clear text password * 'name' the user's full name * 'mail' the user's email address * * Keep in mind that DokuWiki will access this information through the * names listed above so aliases might be necessary. * * Following patters will be replaced: * %{user} user name */ $conf['auth']['mysql']['getUserInfo'] = "SELECT pass, pseudo AS name, mail FROM nk_users WHERE pseudo='%{user}'"; /* This statement is used to get all groups a user is member of. The * result should be a table containing all groups the given user is * member of. The module access the group name as 'group' so a alias * might be necessary. * * Following patters will be replaced: * %{user} user name */ $conf['auth']['mysql']['getGroups'] = "SELECT niveau as `group` FROM nk_users WHERE pseudo='%{user}'";
Moderator and superuser config
A local.php for example. Note the 2 lines relative to the admin level
$conf['title'] = 'Documentation Nuked-Klan'; $conf['start'] = 'accueil'; $conf['lang'] = 'fr'; $conf['baseurl'] = 'http://docs.nuked-klan.org/'; $conf['dformat'] = 'd/m/Y H:i'; $conf['useacl'] = 1; $conf['authtype'] = 'mysql'; $conf['passcrypt'] = 'md5'; $conf['superuser'] = '@9'; //admin level 9 in nuked-klan are super users in DokuWiki $conf['manager'] = '@2'; //admin level 2 in nuked-klan are managers in DokuWiki
plugin/authmysql/nuked-klan.txt · Last modified: 2013-03-16 16:34 by Klap-in