PHP 클래스 auth_plugin_authldap, dokuwiki

저자: Andreas Gohr ([email protected])
저자: Chris Smith ([email protected])
저자: Jan Schumann ([email protected])
상속: extends DokuWiki_Auth_Plugin
파일 보기 프로젝트 열기: splitbrain/dokuwiki

보호된 프로퍼티들

프로퍼티 타입 설명
$_pattern * @var array $_pattern User filter pattern
$bound * @var int $bound What type of connection does already exist?
$con * @var resource $con holds the LDAP connection
$users * @var array $users User data cache

공개 메소드들

메소드 설명
__construct ( ) Constructor
checkPass ( string $user, string $pass ) : boolean Check user+password
getUserData ( string $user, boolean $requireGroups = true ) : array Return user info
isCaseSensitive ( ) : boolean Most values in LDAP are case-insensitive
modifyUser ( string $user, array $changes ) : boolean Definition of the function modifyUser in order to modify the password
retrieveUsers ( integer $start, integer $limit, array $filter = [] ) : array Bulk retrieval of user data

보호된 메소드들

메소드 설명
_constructPattern ( $filter ) : void Set the filter pattern
_debug ( string $message, integer $err, integer $line, string $file ) : void Wrapper around msg() but outputs only when debug is enabled
_filter ( string $user, array $info ) : boolean return true if $user + $info match $filter criteria, false otherwise
_filterEscape ( string $string ) : string Escape a string to be used in a LDAP filter
_getUserData ( string $user, boolean $inbind = false ) : array
_ldapsearch ( resource $link_identifier, string $base_dn, string $filter, string $scope = 'sub', null | array $attributes = null, integer $attrsonly, integer $sizelimit ) : resource Wraps around ldap_search, ldap_list or ldap_read depending on $scope
_makeFilter ( string $filter, array $placeholders ) : string Make LDAP filter strings.
_openLDAP ( ) Opens a connection to the configured LDAP server and sets the wanted option on the connection

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( )

_constructPattern() 보호된 메소드

Set the filter pattern
저자: Chris Smith ([email protected])
protected _constructPattern ( $filter ) : void
$filter
리턴 void

_debug() 보호된 메소드

Wrapper around msg() but outputs only when debug is enabled
protected _debug ( string $message, integer $err, integer $line, string $file ) : void
$message string
$err integer
$line integer
$file string
리턴 void

_filter() 보호된 메소드

return true if $user + $info match $filter criteria, false otherwise
저자: Chris Smith ([email protected])
protected _filter ( string $user, array $info ) : boolean
$user string the user's login name
$info array the user's userinfo array
리턴 boolean

_filterEscape() 보호된 메소드

Ported from Perl's Net::LDAP::Util escape_filter_value
저자: Andreas Gohr
protected _filterEscape ( string $string ) : string
$string string
리턴 string

_getUserData() 보호된 메소드

protected _getUserData ( string $user, boolean $inbind = false ) : array
$user string
$inbind boolean authldap specific, true if in bind phase
리턴 array containing user data or false

_ldapsearch() 보호된 메소드

Wraps around ldap_search, ldap_list or ldap_read depending on $scope
저자: Andreas Gohr ([email protected])
protected _ldapsearch ( resource $link_identifier, string $base_dn, string $filter, string $scope = 'sub', null | array $attributes = null, integer $attrsonly, integer $sizelimit ) : resource
$link_identifier resource
$base_dn string
$filter string
$scope string can be 'base', 'one' or 'sub'
$attributes null | array
$attrsonly integer
$sizelimit integer
리턴 resource

_makeFilter() 보호된 메소드

Used by auth_getUserData to make the filter strings for grouptree and groupfilter
저자: Troels Liebe Bentsen ([email protected])
protected _makeFilter ( string $filter, array $placeholders ) : string
$filter string ldap search filter with placeholders
$placeholders array placeholders to fill in
리턴 string

_openLDAP() 보호된 메소드

Opens a connection to the configured LDAP server and sets the wanted option on the connection
저자: Andreas Gohr ([email protected])
protected _openLDAP ( )

checkPass() 공개 메소드

Checks if the given user exists and the given plaintext password is correct by trying to bind to the LDAP server
저자: Andreas Gohr ([email protected])
public checkPass ( string $user, string $pass ) : boolean
$user string
$pass string
리턴 boolean

getUserData() 공개 메소드

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
저자: Andreas Gohr ([email protected])
저자: Trouble
저자: Dan Allen ([email protected])
저자: ([email protected])
저자: Stephane Chazelas ([email protected])
저자: Steffen Schoch ([email protected])
public getUserData ( string $user, boolean $requireGroups = true ) : array
$user string
$requireGroups boolean (optional) - ignored, groups are always supplied by this plugin
리턴 array containing user data or false

isCaseSensitive() 공개 메소드

Most values in LDAP are case-insensitive
public isCaseSensitive ( ) : boolean
리턴 boolean

modifyUser() 공개 메소드

Definition of the function modifyUser in order to modify the password
public modifyUser ( string $user, array $changes ) : boolean
$user string nick of the user to be changed
$changes array array of field/value pairs to be changed (password will be clear text)
리턴 boolean true on success, false on error

retrieveUsers() 공개 메소드

Bulk retrieval of user data
저자: Dominik Eckelmann ([email protected])
public retrieveUsers ( integer $start, integer $limit, array $filter = [] ) : array
$start integer index of first user to be returned
$limit integer max number of users to be returned
$filter array array of field/pattern pairs, null for no filter
리턴 array of userinfo (refer getUserData for internal userinfo details)

프로퍼티 상세

$_pattern 보호되어 있는 프로퍼티

* @var array $_pattern User filter pattern
protected $_pattern

$bound 보호되어 있는 프로퍼티

* @var int $bound What type of connection does already exist?
protected $bound

$con 보호되어 있는 프로퍼티

* @var resource $con holds the LDAP connection
protected $con

$users 보호되어 있는 프로퍼티

* @var array $users User data cache
protected $users