\Pydio\Auth\Driver\LDAP\LdapProviderLdapProviderWrapper

Class LdapProviderWrapper

Summary

Methods
Properties
Constants
__construct()
tryToBind()
setLdapOption()
search()
getLdapUsers()
getRawLdapUsers()
getListOfUserDN()
getListOfUserId()
getLdapGroups()
countUser()
getRawLdapGroups()
getUserChildrenOfOU()
getListUserIdChildrenOfOU()
getOUChildrenOfOU()
getUserChildrenOfGroup()
getGroupChildrenOfGroup()
checkPassword()
userExist()
getRootDSE()
__deconstruct()
convertUser()
buildGroupTree()
getUserGroupPathBaseOU()
getGroupPath()
getOUNodeByName()
getOUNodeByDn()
getOUNodeById()
getRawLdapOUs()
autoDetectRootDN()
getFullUserById()
getDisplayNameRootDN()
getAllPossibleOUs()
getTopLevelOU()
getAllGroups()
setMemberOf()
sanitizeFilterString()
compactDN()
addDomainNameIntoDN()
filterDNs()
sanitizeDN()
getAdditionalAttributeFromMapping()
wapperListUsersPaginated()
getNumberOfUserOfGroup()
getListUserOfGroup()
addProviders()
getLdapProvider()
listUsersPaginated()
listUsers()
getUserLdapProvider()
$providerName
$providerId
$enabled
$cacheService
$configs
$groupTree
$domain
No constants found
maskConfig()
gotFullPage()
getUserGroupPathBaseMemberOf()
buildLdapGroupTree()
buildOUTree()
buildTreeNoMappingGroupPath()
getProviderByDomainName()
convertBasePathToDN()
$server
N/A
sort()
isDNmatchUserDN()
ldap_explode_dn()
decodeUTF8()
convertDn()
listUserGroupBaseToDNNoGroup()
listUserGroupBaseToDNOUToGroup()
listUserGroupBaseToDNGroupToGroup()
listuserSearchWithRegexp()
convertRegexpToFilter()
regexpToLdap()
$ldapProviders
N/A

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

$ldapProviders

$ldapProviders : array

Type

array — of LdapProvider

Methods

__construct()

__construct(array  $ldapProviders) 

Parameters

array $ldapProviders

tryToBind()

tryToBind() 

setLdapOption()

setLdapOption() 

Set specific ldap option

search()

search(\Pydio\Auth\Driver\LDAP\LdapProvider\base  $dn, string  $filter, \Pydio\Auth\Driver\LDAP\LdapProvider\an  $expected, integer  $offset = -1, integer  $limit = -1) : array

Parameters

\Pydio\Auth\Driver\LDAP\LdapProvider\base $dn

base DN for searching

string $filter

string to filter object

\Pydio\Auth\Driver\LDAP\LdapProvider\an $expected

an array of objects' attribute return by ldap

integer $offset

paging offset

integer $limit

paging limit

Returns

array

getLdapUsers()

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

Parameters

$dn
$filter
$expected
$offset
$limit

Returns

array —

List of LdapUser object

getRawLdapUsers()

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

Parameters

String $dn

String

String $filter

String

Array $expected

Array of String

integer $offset

int

integer $limit

int

Returns

array

getListOfUserDN()

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

Parameters

$dn
$filter
$expected
$offset
$limit

getListOfUserId()

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

Parameters

$dn
$filter
$expected
integer $offset
integer $limit

Returns

array

getLdapGroups()

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

Parameters

$dn
$filter
$expected
$offset
$limit

Returns

array —

List of object LdapGroup

countUser()

countUser(null  $dn = null) : integer

Parameters

null $dn

Returns

integer

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(\Pydio\Auth\Driver\LDAP\LdapProvider\user  $id, \Pydio\Auth\Driver\LDAP\LdapProvider\user  $pass) : boolean

Parameters

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

user ID

\Pydio\Auth\Driver\LDAP\LdapProvider\user $pass

user Password

Returns

boolean

userExist()

userExist(  $userId) : boolean

Parameters

$userId

Returns

boolean

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

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

addProviders()

addProviders(  $ldapProviders) 

Parameters

$ldapProviders

getLdapProvider()

getLdapProvider() 

listUsersPaginated()

listUsersPaginated(  $baseGroup,   $regexp,   $offset = -1,   $limit = -1,   $recursive = true) 

Parameters

$baseGroup
$regexp
$offset
$limit
$recursive

listUsers()

listUsers(  $baseGroup,   $recursive = true) 

Parameters

$baseGroup
$recursive

getUserLdapProvider()

getUserLdapProvider(  $userId) 

Parameters

$userId

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'

convertBasePathToDN()

convertBasePathToDN(  $basePath) 

Parameters

$basePath

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