PHP Class Kimai_Auth_Ldapadvanced

This is free software. Use it however you want To activate this Authentication Adapter, add the following line to the includes/autoconf.php-file: $authenticator = 'ldapadvanced'; To use your own config you can either overwrite the values given in this class or you extend this class with your own class just containing your own configuration. More Information is provided in the LDAP_README.md
Since: 15.08.2014
Author: Andreas Heigl ([email protected])
Inheritance: extends Kimai_Auth_Abstract
Mostrar archivo Open project: kimai/kimai Class Usage Examples

Protected Properties

Property Type Description
$allowedGroupIds array Members of which LDAP-groups shall have access to kimai
$autocreateUsers boolean Automatically create a user in Kimai if the login is successful.
$bindDN string Leave empty for anonymous bind
$bindPW string The password to ue for non anonymous bind
$commonNameAttribute Which LDAP-Attribute contains a readable username
$defaultGlobalRoleName string The name of the default global role the user should be added to.
$defaultGroupMemberships array Map of group=>role names for new users
$forceLowercase boolean Shall we force usernames to lowercase?
$groupFilter The string %1$s will be replaced by the content of the attribute self::$usernameAttribute, the string %2$s will be replaced by the DN of the user
$groupidAttribute string This is referenced by the entries of self::$allowedGroupIds
$host string Remember that you can include ldaps scheme or a port number here
$mailAttribute string This is just to set the correct mail-address for the user
$nonLdapAcounts array All entries in this array will not be checked against the LDAP
$searchBase string Search base to use
$userFilter string The string '%s' will be replaced by the string the user provided as username
$usernameAttribute Which LDAP-Attribute contains the username

Public Methods

Method Description
__construct ( $database = null, $kga = null ) {@inherit}
authenticate ( $username, $password, &$userId ) {@inherit}
getDefaultGlobalRole ( ) : integer Get the default global role
getDefaultGroups ( ) : array Get a map of group=>role associations for new users

Protected Methods

Method Description
createCheckUsername ( $username, $uidAttribute ) : string

Method Details

__construct() public method

{@inherit}
public __construct ( $database = null, $kga = null )

authenticate() public method

{@inherit}
public authenticate ( $username, $password, &$userId )

createCheckUsername() protected method

protected createCheckUsername ( $username, $uidAttribute ) : string
$username
$uidAttribute
return string

getDefaultGlobalRole() public method

Get the default global role
public getDefaultGlobalRole ( ) : integer
return integer

getDefaultGroups() public method

Get a map of group=>role associations for new users
public getDefaultGroups ( ) : array
return array

Property Details

$allowedGroupIds protected_oe property

Members of which LDAP-groups shall have access to kimai
protected array $allowedGroupIds
return array

$autocreateUsers protected_oe property

Automatically create a user in Kimai if the login is successful.
protected bool $autocreateUsers
return boolean

$bindDN protected_oe property

Leave empty for anonymous bind
protected string $bindDN
return string

$bindPW protected_oe property

The password to ue for non anonymous bind
protected string $bindPW
return string

$commonNameAttribute protected_oe property

Which LDAP-Attribute contains a readable username
protected $commonNameAttribute

$defaultGlobalRoleName protected_oe property

The name of the default global role the user should be added to.
protected string $defaultGlobalRoleName
return string

$defaultGroupMemberships protected_oe property

Map of group=>role names for new users
protected array $defaultGroupMemberships
return array

$forceLowercase protected_oe property

Shall we force usernames to lowercase?
protected bool $forceLowercase
return boolean

$groupFilter protected_oe property

The string %1$s will be replaced by the content of the attribute self::$usernameAttribute, the string %2$s will be replaced by the DN of the user
protected $groupFilter

$groupidAttribute protected_oe property

This is referenced by the entries of self::$allowedGroupIds
protected string $groupidAttribute
return string

$host protected_oe property

Remember that you can include ldaps scheme or a port number here
protected string $host
return string

$mailAttribute protected_oe property

This is just to set the correct mail-address for the user
protected string $mailAttribute
return string

$nonLdapAcounts protected_oe property

All entries in this array will not be checked against the LDAP
protected array $nonLdapAcounts
return array

$searchBase protected_oe property

Search base to use
protected string $searchBase
return string

$userFilter protected_oe property

The string '%s' will be replaced by the string the user provided as username
protected string $userFilter
return string

$usernameAttribute protected_oe property

Which LDAP-Attribute contains the username
protected $usernameAttribute