Download the PHP package fgsl/laminas-user-ldap without Composer
On this page you can find all versions of the php package fgsl/laminas-user-ldap. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download fgsl/laminas-user-ldap
More information about fgsl/laminas-user-ldap
Files in fgsl/laminas-user-ldap
Package laminas-user-ldap
Short Description Laminas User LDAP Authentication
License New BSD License
Homepage https://github.com/fgsl/laminas-user-ldap.git
Informations about the package laminas-user-ldap
LaminasUserLdap
Laminas LaminasUser Extension to provide LDAP Authentication
It is a adaptation from ZfcUserLdap to Laminas
Features
- Provides an adapter chain for LDAP authentication.
- Allows login by username & email address
- Provides automatic failover between configured LDAP Servers
- Provides an identity provider for BjyAuthorize
TODO / In Progress
- Add ability to register a user in ldap
- Allow password resets in ldap
Setup
The following steps are necessary to get this module working
- Run
php composer.phar require fgsl/laminas-user-ldap:1.0.0
- Add
LaminasUserLdap
to the enabled modules list (Requires ZfcUser to be activated also) -
Add Laminas LDAP configuration to your autoload with key 'ldap' based on: https://docs.laminas.dev/laminas-ldap/intro/
An example of the configuration is shown below for configs/autoload/global.php Please make sure you do not include passwords in this file, I've included it for illustration purposes only
array( 'ldap' => array( 'server1' => array( 'host' => 's0.foo.net', 'username' => 'CN=user1,DC=foo,DC=net', 'password' => 'pass1', 'bindRequiresDn' => true, 'accountDomainName' => 'foo.net', 'baseDn' => 'OU=Sales,DC=foo,DC=net', ), 'server2' => array( 'host' => 's0.foo2.net', 'username' => 'CN=user1,DC=foo,DC=net', 'password' => 'pass1', 'bindRequiresDn' => true, 'accountDomainName' => 'foo.net', 'baseDn' => 'OU=Sales,DC=foo,DC=net', ), ) ),
Application Configuration
Please make sure to enable both LaminasUser and LaminasUserLdap in your application.config.php as shown below
array( 'LaminasUser', 'LaminasUserLdap', /* It's important to load LaminasUser before LaminasUserLdap as LaminasUserLdap is an addon to LaminasUser */ );
LaminasUser Configuration
For the initial release please make sure to set the following settings in your laminasuser configuration:
array( 'enable_registration' => false, 'enable_username' => true, 'auth_adapters' => array( 100 => 'LaminasUserLdap\Authentication\Adapter\Ldap' ), 'auth_identity_fields' => array( 'username','email' ), ),
Final notes
In the above configuration auth_identity_fields can be left as email only if you like, however it's recommended to allow ldap users to be able to log in with their ldap uid. enable_registration should however be turned off at this point as it will cause issues when the user tries to sign up and it can't create the entity within LDAP.
There are some more error handling that needs to be done in the module, as well as the ability to make modifications as per the zfcuser module abilities. However this has currently been disabled and you will not be able to change passwords.
Enjoy and if you find bugs or issues please add pull requests for the module.
All versions of laminas-user-ldap with dependencies
laminas/laminas-mvc Version 3.1.*
fgsl/laminas-user Version 0.2.*
laminas/laminas-log Version ^2.12
laminas/laminas-ldap Version ^2.10
laminas/laminas-permissions-rbac Version ^3.0
laminas/laminas-permissions-acl Version ^2.7