Download the PHP package sroutier/eloquent-ldap without Composer

On this page you can find all versions of the php package sroutier/eloquent-ldap. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package eloquent-ldap

eloquent-ldap

Latest Version on Packagist

A Laravel package that first tries to log the user against the internal database, if that fails, it tries against the configured LDAP/AD server. Optionally it will create a local user record on first login of an LDAP user, as well as grant that user permissions to local groups that have matching names of the LDAP groups that the user is a member of.

Version Compatibility

Laravel LERN
5.1.x 1.x
5.5.x 2.x

Install

Via Composer

Declare provider

Add this declaration in the provider array of your ./config/app.php file:

Publish assets

To publish the assets, config file and migration scripts, run this command:

This will publish a config file and a migration file.

Migration

The migration script will add a new column auth_type to the schema of the users table, and one column resync_on_login to the groups table. You should already have both tables, but if you do not or if you want to use different tables for those purposes, the migration to create those tables is provided as an example, but commented out. You will want to review the migration script and adjust according to your scenario.

Once ready, run the migration script with this command:

Configure

The recommended way to configure this package is by defining the following variables in you .env file and adjusting the values there. For a detailed explanation of each setting, refer to the config file that you published above.

The configuration that you will need will vary based on the type or server that you wish to authenticate against. Below are example config section for both options, Lightweight Directory Access Protocol (LDAP) and Microsoft Active Directory (MSAD).

Microsoft Active Directory server.

Below is a section of a config file that shows how to configure your system to access a Microsoft Active Directory server:

Lightweight Directory Access Protocol server.

Below is a section of a config file that shows how to configure your system to access a Lightweight Directory Access Protocol server:

NOTE: THe configuration options above will allow you to connect and authenticate users using the publicly available OpenLDAP test server hosted by Forum Systems.

MSAD vs LDAP

A couple of difference in how to configure the system depending on which server type is being used are worth pointing out.

Usage

The users table/model must have the following columns/attributes named username, first_name, last_name and email. The migration script provided with this package has an example of how to create such a table but it is commented out.

The user model must have the auth-type attribute added to its fillable array to allow setting the column in the database.

Also your login view and AuthController must accept a user name and password. They can accept other fields if you want, such as email, security token, etc... But the first time a new user tries to log in, since he will not be found in the local database, the package will need the user name to authenticate against the LDAP server.

Example

For a concrete example of this package used in an active project, see sroutier/laravel-5.1-enterprise-starter-kit. Note that in that project this package is used in combination with Zizaco/entrust to provide role based authorization, therefore there is no group model, but instead a role model.

Change log

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The GNU General Public License Version 3 (GPLv3). Please see License File for more information.


All versions of eloquent-ldap with dependencies

PHP Build Version
Package Version
Requires illuminate/support Version 5.5.*
php Version >=7.0.0
adldap2/adldap2 Version ~8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sroutier/eloquent-ldap contains the following files

Loading the files please wait ....