[ Index ]

PHP Cross Reference of DokuWiki




/lib/plugins/authldap/ -> auth.php (summary)

(no description)

File Size: 699 lines (25 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

auth_plugin_authldap:: (14 methods):

Class: auth_plugin_authldap  - X-Ref

LDAP authentication backend

__construct()   X-Ref

checkPass($user, $pass)   X-Ref
Check user+password

Checks if the given user exists and the given
plaintext password is correct by trying to bind
to the LDAP server

param: string $user
param: string $pass
author: Andreas Gohr <andi@splitbrain.org>
return: bool

getUserData($user, $requireGroups = true)   X-Ref
Return user info

Returns info about the given user needs to contain
at least these fields:

name string  full name of the user
mail string  email addres of the user
grps array   list of groups the user is in

This LDAP specific function returns the following
addional fields:

dn     string  distinguished name (DN)
uid    string  Posix User ID
inbind bool    for internal use - avoid loop in binding

param: string $user
param: bool $requireGroups (optional) - ignored, groups are always supplied by this plugin
author: <evaldas.auryla@pheur.org>
author: Stephane Chazelas <stephane.chazelas@emerson.com>
author: Steffen Schoch <schoch@dsb.net>
author: Andreas Gohr <andi@splitbrain.org>
author: Trouble
author: Dan Allen <dan.j.allen@gmail.com>
return: array containing user data or false

fetchUserData($user, $inbind = false)   X-Ref

param: string $user
param: bool $inbind authldap specific, true if in bind phase
return: array containing user data or false

modifyUser($user, $changes)   X-Ref
Definition of the function modifyUser in order to modify the password

param: string $user nick of the user to be changed
param: array $changes array of field/value pairs to be changed (password will be clear text)
return: bool   true on success, false on error

isCaseSensitive()   X-Ref
Most values in LDAP are case-insensitive

return: bool

retrieveUsers($start = 0, $limit = 0, $filter = array()   X-Ref
Bulk retrieval of user data

param: int $start index of first user to be returned
param: int $limit max number of users to be returned
param: array $filter array of field/pattern pairs, null for no filter
author: Dominik Eckelmann <dokuwiki@cosmocode.de>
return: array of userinfo (refer getUserData for internal userinfo details)

makeFilter($filter, $placeholders)   X-Ref
Make LDAP filter strings.

Used by auth_getUserData to make the filter
strings for grouptree and groupfilter

param: string $filter ldap search filter with placeholders
param: array $placeholders placeholders to fill in
author: Troels Liebe Bentsen <tlb@rapanden.dk>
return: string

filter($user, $info)   X-Ref
return true if $user + $info match $filter criteria, false otherwise

param: string $user the user's login name
param: array $info the user's userinfo array
author: Chris Smith <chris@jalakai.co.uk>
return: bool

constructPattern($filter)   X-Ref
Set the filter pattern

param: $filter
author: Chris Smith <chris@jalakai.co.uk>
return: void

filterEscape($string)   X-Ref
Escape a string to be used in a LDAP filter

Ported from Perl's Net::LDAP::Util escape_filter_value

param: string $string
author: Andreas Gohr
return: string

openLDAP()   X-Ref
No description

ldapSearch($link_identifier,$base_dn,$filter,$scope = 'sub',$attributes = null,$attrsonly = 0,$sizelimit = 0)   X-Ref
Wraps around ldap_search, ldap_list or ldap_read depending on $scope

param: resource $link_identifier
param: string $base_dn
param: string $filter
param: string $scope can be 'base', 'one' or 'sub'
param: null|array $attributes
param: int $attrsonly
param: int $sizelimit
author: Andreas Gohr <andi@splitbrain.org>
return: resource

debug($message, $err, $line, $file)   X-Ref
Wrapper around msg() but outputs only when debug is enabled

param: string $message
param: int $err
param: int $line
param: string $file
return: void