Download the PHP package radebatz/ldap-auth-service-provider without Composer
On this page you can find all versions of the php package radebatz/ldap-auth-service-provider. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download radebatz/ldap-auth-service-provider
More information about radebatz/ldap-auth-service-provider
Files in radebatz/ldap-auth-service-provider
Package ldap-auth-service-provider
Short Description Silex Ldap authentication service provider.
License MIT
Homepage http://radebatz.net/mano/
Informations about the package ldap-auth-service-provider
A Silex Ldap authentication service provider
This service provider provides Ldap based authentication and authorization.
Basic Usage
- Form based authentication
- roles are mapped based on the user being in the specified LDAP group(s).
- The LDAP sn attribute is mapped to the userName property of the user object created
Installation
The recommended way to install ldap-auth-service-provider is through composer.
Install the latest version with:
Configuring Ldap
The Ldap related code depends on zend-ldap
, so all configuration options are just passed through.
For more details check the zend-ldap docs
.
The default username value used to autheticate (bind) a user is the LDAP dn attribute (there is a default mapping ). To change this or allow an alternative fallback attribute, the following attribute mapping could have been used in the example above:
NOTE: The property 'authName' of the loaded user object is used for the bind when validating the user credentials (password). As a default the LDAP 'dn' attribute is mapped to the authName property of the user.
In addition the provider allows to configure a list of hosts to try. If none in the list can't be connected, the regularly configured host is used as last resort.
Example: ` In this case the code will try to connect in the order: ldap1, ldap2, localhost.
Custom user class
The LdapUserProvider class allows to configure a custom User class to be used.
Only restriction is that the custom class has a constructor that is compatible with the default class Symfony\\Component\\Security\\Core\\User\\User
.
Requirements
- Silex 2.0
- PHP 5.5
License
All code is licensed under the MIT license.
Changelog
Issues that break backwards compatibility are flagged [BC].
v1.0.0
- Initial release
v1.1.0
- Move options into security.ldap.[serviceName] namespace
- Add preconfigured user provider
v1.2.0
- Add Silex 1.3 support
- bug fixes
v1.2.1
- Add hosts option to allow a list of fallback servers
v1.2.2
- Fix LdapException handling
- Add Psr\Log dependency
- [BC] Make the logger an optional second constructor argument instead of taking it from $app
v1.3.0
- Use users DN as name when trying to bind user [#15]
- add new authName mapping to allow to control what LDAP attribute to use to bind when authentication (defaults to DN)
- Fix merging of LdapUserProvider defaults
- Check for values array when mapping LDAP data to user instance
- [BC] Custom user classes must either support magic get/set methods or at least implement
,
All versions of ldap-auth-service-provider with dependencies
psr/log Version ^1.0
silex/silex Version ^1.3|~2.0
symfony/security Version ~2.8|^3.0
zendframework/zend-ldap Version ~2.4