====== ProjectPier ======
Configuration for [[plugin:authMySQL]] Auth plugin to authenticate with [[http://projectpier.org/|ProjectPier]], which let's do:
* Only basic authentication
* No user modification/adding. This assumes that all user/group accounts will be created and maintained through ProjectPier.
Disclaimer: this procedure was based on the [[plugin:authmysql:gallery2|DokuWiki/Gallery2 page]]
This also assumes that the company name in project pier is the group (table pp_companies, field name), so you know what to use in acl.auth.php
Based on ProjectPier_0.8.0-final.zip version\\
DokuWiki version 2007-06-26b\\
===== MySql authentication in Project Pier =====
ProjectPier stores passwords in SHA1 with a salt, in 2 fields in pp_users table: the token (40 chars, the password) and the salt (13 chars). The token (password) is calculated as "sha1($salt . $typed_pass);", where $salt is the 13 char value from salt field and $typed_pass is the password supplied by the user.
===== DokuWiki changes =====
Due to how ProjectPier stores its passwords as stated above, none of DokuWiki's built-in-encryptions work so one must edit the function auth_verifyPassword in inc/auth.php (the lenght is 53 because its the concatenation of salt and token fields):
...
}elseif($len == 32){
$method = 'md5';
}elseif($len == 53){ // projectpier sha1, 13 chars salt, 40 char token
$method = 'sha1';
$privatesalt = substr($crypt,0,13);
$clear = $privatesalt.$clear;
$crypt = substr($crypt, 13, 40);
}elseif($len == 40){
$method = 'sha1';
...
====Configuration====
Use the Config Manager or add it to the ''conf/local.protected.php'' to store the config protected.
--- //[[no@email.com|Marcio Ferreira]] 2008-01-15//