Properties

$providerName

$providerName : 

Type

$providerId

$providerId : 

Type

$enabled

$enabled : 

Type

$cacheService

$cacheService : \Pydio\Auth\Driver\LDAP\LdapProvider\cache

Type

\Pydio\Auth\Driver\LDAP\LdapProvider\cache — service object.

$groupTree

$groupTree : 

Type

$domain

$domain : string

Type

string — Name of domain. ex: company.com

$server

$server : 

Type

— : RawConnection

Methods

__construct()

__construct(  $configs = null) 

Parameters

$configs

tryToBind()

tryToBind() 

setLdapOption()

setLdapOption() 

Set specific ldap option

search()

search(  $dn,   $filter,   $expected,   $offset = -1,   $limit = -1) : array

Parameters

$dn

base DN for searching

$filter

string to filter object

$expected

an array of objects' attribute return by ldap

$offset

paging offset

$limit

paging limit

Returns

array —

an array of object

getLdapUsers()

getLdapUsers(  $dn,   $filter,   $expected,   $offset = -1,   $limit = -1) : array

Parameters

$dn
$filter
$expected
$offset
$limit

Returns

array —

List of LdapUser object

getRawLdapUsers()

getRawLdapUsers(  $dn,   $filter,   $expected,   $offset = -1,   $limit = -1) : array

Parameters

$dn

String

$filter

String

$expected

Array of String

$offset

int

$limit

int

Returns

array —

List of user returned by ldap server.

getListOfUserDN()

getListOfUserDN(  $dn,   $filter,   $expected,   $offset = -1,   $limit = -1) 

Parameters

$dn
$filter
$expected
$offset
$limit

getListOfUserId()

getListOfUserId(  $dn,   $filter,   $expected,   $offset = -1,   $limit = -1) 

Parameters

$dn
$filter
$expected
$offset
$limit

getLdapGroups()

getLdapGroups(  $dn,   $filter,   $expected,   $offset = -1,   $limit = -1) : array

Parameters

$dn
$filter
$expected
$offset
$limit

Returns

array —

List of object LdapGroup

countUser()

countUser(  $dn = null) : integer

Parameters

$dn

Returns

integer —

return number of user.

getRawLdapGroups()

getRawLdapGroups(  $dn,   $filter,   $expected,   $offset,   $limit) : array

Parameters

$dn
$filter
$expected
$offset
$limit

Returns

array —

List of group returned by ldap server

getUserChildrenOfOU()

getUserChildrenOfOU(  $ouDN,   $offset = -1,   $limit = -1) : array

Parameters

$ouDN
$offset
$limit

Returns

array —

of User

Get all children type 'User' in given OU. (not recusive)

getListUserIdChildrenOfOU()

getListUserIdChildrenOfOU(  $ouDN, integer  $offset = -1, integer  $limit = -1) : array

Parameters

$ouDN
integer $offset
integer $limit

Returns

array

getOUChildrenOfOU()

getOUChildrenOfOU(  $ouDN,   $filter,   $expected,   $offset,   $limit) : array

Parameters

$ouDN

Organization Dn

$filter
$expected
$offset
$limit

Returns

array —

of Group

getUserChildrenOfGroup()

getUserChildrenOfGroup(  $groupDN,   $filter,   $expected,   $offset,   $limit) : array

Parameters

$groupDN
$filter
$expected
$offset
$limit

Returns

array —

of Users

getGroupChildrenOfGroup()

getGroupChildrenOfGroup(  $groupDN,   $filter,   $expected,   $offset,   $limit) : array

Parameters

$groupDN
$filter
$expected
$offset
$limit

Returns

array —

of Group

checkPassword()

checkPassword(string  $id, string  $pass) : boolean

Parameters

string $id

user ID

string $pass

user Password

Returns

boolean —

take User ID, get User's DN of ldap then authenticate with DN/password (not userID/password).

userExist()

userExist(  $id) 

Parameters

$id

getRootDSE()

getRootDSE() 

__deconstruct()

__deconstruct() 

convertUser()

convertUser(  $rawLdapUser,   $attrList = array()) : \Pydio\Auth\Driver\LDAP\Utils\LdapUser

Parameters

$rawLdapUser

user return from LDAP. This is an array in ldap's format

$attrList

Returns

\Pydio\Auth\Driver\LDAP\Utils\LdapUser

object

buildGroupTree()

buildGroupTree() 

A group tree for Pydio

getUserGroupPathBaseOU()

getUserGroupPathBaseOU(  $ldapUser) : array

Parameters

$ldapUser

Returns

array —

The result of this function is value of LdapUser -> pydioOuPath Element structure:

  • id
  • label
  • dn

getGroupPath()

getGroupPath(  $ldapGroup,   $groupPath) 

Parameters

$ldapGroup
$groupPath

getOUNodeByName()

getOUNodeByName(  $OUTree,   $OUName,   $OUNode) 

Parameters

$OUTree
$OUName
$OUNode

search by Name an group in Group Tree

getOUNodeByDn()

getOUNodeByDn(  $OUTree,   $OUdn,   $OUNode) 

Parameters

$OUTree
$OUdn
$OUNode

search by Dn an group in Group Tree

getOUNodeById()

getOUNodeById(  $OUTree,   $OUId,   $OUNode) 

Parameters

$OUTree
$OUId
$OUNode

search by ID an group in Group Tree

getRawLdapOUs()

getRawLdapOUs(  $dn,   $filter,   $expected,   $offset = -1,   $limit = -1) 

Parameters

$dn
$filter
$expected
$offset
$limit

autoDetectRootDN()

autoDetectRootDN() : array|null

Returns

array|null —

Automatically detect domain name return an array : array={0 => DC=pydio, 1=> DC=pydio}

getFullUserById()

getFullUserById(\Pydio\Auth\Driver\LDAP\LdapProvider\ID  $id) : \Pydio\Auth\Driver\LDAP\Utils\LdapUser

Parameters

\Pydio\Auth\Driver\LDAP\LdapProvider\ID $id

ID of user

Returns

\Pydio\Auth\Driver\LDAP\Utils\LdapUser

getDisplayNameRootDN()

getDisplayNameRootDN() : string

Returns

string —

like pydio.com

getAllPossibleOUs()

getAllPossibleOUs() 

getTopLevelOU()

getTopLevelOU() 

getAllGroups()

getAllGroups() 

setMemberOf()

setMemberOf(  $ldapUser,   $rawLdapUser) 

Parameters

$ldapUser
$rawLdapUser

sanitizeFilterString()

sanitizeFilterString(string  $str) : string

Parameters

string $str

Returns

string —

Sanitized string inside of ( and ) Sanitize filter string to be able concatenated with others to make new filter.

compactDN()

compactDN(  $dn,   $domain) : \Pydio\Auth\Driver\LDAP\LdapProvider\dn

Parameters

$dn
$domain

array

Returns

\Pydio\Auth\Driver\LDAP\LdapProvider\dn

addDomainNameIntoDN()

addDomainNameIntoDN(  $dns,   $domain) : array|string

Parameters

$dns
$domain

Returns

array|string —

If compactDomainName is set, we have to add domain in dn when execute a search on ldap for ex: ou=people will be ou=people,dc=vpydio,dc=fr

filterDNs()

filterDNs(  $testDN) : boolean

Parameters

$testDN

Returns

boolean —

Make sure that all dn when doing the search does not get out of user's defined DNs

sanitizeDN()

sanitizeDN(  $dn) 

Parameters

$dn

getAdditionalAttributeFromMapping()

getAdditionalAttributeFromMapping() : array

Returns

array

wapperListUsersPaginated()

wapperListUsersPaginated(  $baseGroup,   $regexp, integer  $offset = -1, integer  $limit = -1, boolean|true  $recursive = true) : \Pydio\Auth\Driver\LDAP\LdapProvider\array()

Parameters

$baseGroup
$regexp
integer $offset
integer $limit
boolean|true $recursive

Returns

\Pydio\Auth\Driver\LDAP\LdapProvider\array() —

Specific function for Pydio

getNumberOfUserOfGroup()

getNumberOfUserOfGroup(  $groupId) : integer

Parameters

$groupId

Returns

integer

getListUserOfGroup()

getListUserOfGroup(  $groupId) : array|integer|void

Parameters

$groupId

Returns

array|integer|void

maskConfig()

maskConfig() : mixed

Returns

mixed —

Change some properties base on Ldap Provider

gotFullPage()

gotFullPage(  $found,   $offset,   $limit) : boolean

Parameters

$found
$offset
$limit

Returns

boolean

getUserGroupPathBaseMemberOf()

getUserGroupPathBaseMemberOf() 

buildTreeNoMappingGroupPath()

buildTreeNoMappingGroupPath() : null|\Pydio\Auth\Driver\LDAP\Utils\LdapGroup

Returns

null|\Pydio\Auth\Driver\LDAP\Utils\LdapGroup

Build group Tree in case of NO GroupPath mapping By default, return a group whose name is 'domain.com'

sort()

sort(  $a,   $b) 

Parameters

$a
$b

isDNmatchUserDN()

isDNmatchUserDN(  $testDN) : boolean

Merge user DN and group DN to a list of allowed DN.

Parameters

$testDN

Returns

boolean

ldap_explode_dn()

ldap_explode_dn(  $dn,   $with_attributes) 

Parameters

$dn
$with_attributes

decodeUTF8()

decodeUTF8(  $dn) 

Parameters

$dn

convertDn()

convertDn(  $dn, boolean|true  $toPydio = true) : mixed

Parameters

$dn
boolean|true $toPydio

true: to Pydio, false to Ldap

Returns

mixed

listUserGroupBaseToDNNoGroup()

listUserGroupBaseToDNNoGroup(  $groupBase,   $regexp = null,   $offset = -1,   $limit = -1,   $recursive = true) 

Parameters

$groupBase
$regexp
$offset
$limit
$recursive

listUserGroupBaseToDNOUToGroup()

listUserGroupBaseToDNOUToGroup(  $groupBase,   $regexp = null,   $offset = -1,   $limit = -1,   $recursive = true) 

Parameters

$groupBase
$regexp
$offset
$limit
$recursive

listUserGroupBaseToDNGroupToGroup()

listUserGroupBaseToDNGroupToGroup(  $groupBase,   $regexp = null,   $offset = -1,   $limit = -1,   $recursive = true) 

Parameters

$groupBase
$regexp
$offset
$limit
$recursive

listuserSearchWithRegexp()

listuserSearchWithRegexp(  $regexp,   $offset = -1,   $limit = -1) 

Parameters

$regexp
$offset
$limit

convertRegexpToFilter()

convertRegexpToFilter(string  $regexp) : string

Parameters

string $regexp

Returns

string

regexpToLdap()

regexpToLdap(  $regexp) : null|string

Parameters

$regexp

Returns

null|string