summaryrefslogtreecommitdiff
path: root/inc/auth_ldap.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/auth_ldap.php')
-rw-r--r--inc/auth_ldap.php30
1 files changed, 21 insertions, 9 deletions
diff --git a/inc/auth_ldap.php b/inc/auth_ldap.php
index 2872e710f..c1ff55706 100644
--- a/inc/auth_ldap.php
+++ b/inc/auth_ldap.php
@@ -1,15 +1,21 @@
<?php
/**
- * This is used to authenticate against an LDAP server
+ * LDAP authentication backend
*
* tested with openldap 2.x on Debian only
*
* PHPs LDAP extension is needed
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Andreas Gohr <andi@splitbrain.org>
*/
/**
- * connects to the ldap server and holds the connection
- * in global scope for multiple use
+ * Connect to the LDAP server
+ *
+ * Holds the connection in global scope for multiple use
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
*/
function auth_ldap_connect(){
global $LDAP_CONNECTION;
@@ -34,12 +40,14 @@ function auth_ldap_connect(){
}
/**
- * required auth function
+ * Check user+password [required auth function]
*
* Checks if the given user exists and the given
- * plaintext password is correct
+ * plaintext password is correct by trying to bind
+ * to the LDAP server
*
- * It does so by trying to connect to the LDAP server
+ * @author Andreas Gohr <andi@splitbrain.org>
+ * @return bool
*/
function auth_checkPass($user,$pass){
global $conf;
@@ -62,7 +70,7 @@ function auth_checkPass($user,$pass){
}
/**
- * Required auth function
+ * Return user info [required auth function]
*
* Returns info about the given user needs to contain
* at least these fields:
@@ -72,10 +80,12 @@ function auth_checkPass($user,$pass){
* grps array list of groups the user is in
*
* This LDAP specific function returns the following
- * addional fields
+ * addional fields:
*
* dn string distinguished name (DN)
* uid string Posix User ID
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
*/
function auth_getUserData($user){
global $conf;
@@ -125,9 +135,11 @@ function auth_getUserData($user){
}
/**
- * Required auth function
+ * Create a new User [required auth function]
*
* Not implemented
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
*/
function auth_createUser($user,$name,$mail){
msg("Sorry. Creating users is not supported by the LDAP backend",-1);