auth:ntlm
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
auth:ntlm [2008-12-09 19:47] – 70.103.232.219 | auth:ntlm [2016-01-20 08:31] – 77.40.51.212 | ||
---|---|---|---|
Line 4: | Line 4: | ||
This page describes how to set up NTLM (i.e. Windows NT-based) authentication for DokuWiki running on Apache. As an added bonus, the second half of this page describes what you need to do to enable Firefox to " | This page describes how to set up NTLM (i.e. Windows NT-based) authentication for DokuWiki running on Apache. As an added bonus, the second half of this page describes what you need to do to enable Firefox to " | ||
- | //Note: For obvious reasons, this document assumes a DokuWiki install on Windows (perhaps using [[http:// | + | //Note: For obvious reasons, this document assumes a DokuWiki install on Windows (perhaps using [[http:// |
===== Setup NTLM authentication for Apache ===== | ===== Setup NTLM authentication for Apache ===== | ||
Line 80: | Line 80: | ||
$_REQUEST[' | $_REQUEST[' | ||
} | } | ||
- | | + | |
+ | } | ||
</ | </ | ||
Line 201: | Line 202: | ||
* [[http:// | * [[http:// | ||
* [[http:// | * [[http:// | ||
+ | |||
+ | ===== Additions ===== | ||
+ | |||
+ | Using NTLM based auth and as user store the users.auth.php, | ||
+ | |||
+ | <code php> | ||
+ | /** | ||
+ | * Return user info | ||
+ | * | ||
+ | * Returns info about the given user needs to contain | ||
+ | * at least these fields: | ||
+ | * | ||
+ | * name string | ||
+ | * mail string | ||
+ | * grps array list of groups the user is in | ||
+ | * | ||
+ | * @author | ||
+ | */ | ||
+ | function getUserData($user){ | ||
+ | |||
+ | if($this-> | ||
+ | return isset($this-> | ||
+ | } | ||
+ | |||
+ | |||
+ | function _loadUserData(){ | ||
+ | global $config_cascade; | ||
+ | |||
+ | $this-> | ||
+ | |||
+ | if(!@file_exists($config_cascade[' | ||
+ | |||
+ | $lines = file($config_cascade[' | ||
+ | foreach($lines as $line){ | ||
+ | $line = preg_replace('/# | ||
+ | $line = trim($line); | ||
+ | if(empty($line)) continue; | ||
+ | |||
+ | $row = explode(":", | ||
+ | $groups = array_values(array_filter(explode(",", | ||
+ | |||
+ | $this-> | ||
+ | $this-> | ||
+ | $this-> | ||
+ | $this-> | ||
+ | } | ||
+ | } | ||
+ | |||
+ | </ | ||
+ | |||
+ | and comment the function getUserData from original ntlm.class.php | ||
+ | |||
+ | <code php> | ||
+ | //function getUserData($user) { | ||
+ | // global $conf; | ||
+ | // $userInfo[' | ||
+ | // $userInfo[' | ||
+ | // $userInfo[' | ||
+ | // return $userInfo; | ||
+ | //} | ||
+ | </ | ||