Skip to content
Permalink
Browse files

Initial Commit

  • Loading branch information...
neffs committed Oct 14, 2014
1 parent 983f8af commit 8f70169624fa20997f3c2964b6f5419e00fad36f
Showing with 46 additions and 0 deletions.
  1. +40 −0 auth.php
  2. +6 −0 plugin.info.txt
@@ -0,0 +1,40 @@
<?php
/**
* DokuWiki LemonLDAP:NG authentication plugin
* https://www.dokuwiki.org/plugin:authlemonldap
*
*
* @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html
* @author David Kreitschmann
*/
// must be run within Dokuwiki
if(!defined('DOKU_INC')) die();
class auth_plugin_authlemonldap extends DokuWiki_Auth_Plugin {
public function __construct() {
global $conf;
parent::__construct();
$this->cando['logout'] = false;
$this->cando['external'] = true;
}
public function trustExternal($user, $pass, $sticky = false) {
global $USERINFO;
if (isset($_SERVER['HTTP_AUTH_USER'])) {
$_SERVER['REMOTE_USER'] = $_SERVER['HTTP_AUTH_USER'];
$USERINFO['name'] = $_SERVER['HTTP_AUTH_CN'];
$USERINFO['mail'] = $_SERVER['HTTP_AUTH_MAIL'];
$USERINFO['grps'] = explode(';', str_replace("; ", ";", base64_decode($_SERVER['HTTP_AUTH_GROUPS'])));
return true;
}
return false;
}
public function useSessionCache($user) {
return false;
}
}
@@ -0,0 +1,6 @@
base authlemonldap
author David Kreitschmann
email david@kreitschmann.de
date 2014-10-14
name authlemonldap plugin
desc Authenticate against HTTP Headers via LemonLDAP:NG

0 comments on commit 8f70169

Please sign in to comment.
You can’t perform that action at this time.