Download the PHP package dyrynda/laravel-ldap without Composer

On this page you can find all versions of the php package dyrynda/laravel-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 laravel-ldap

Adldap2 Laravel middleware

The excellent Adldap2-Laravel package makes it super simple to integrate your Laravel application with an LDAP server to authenticate your users, but as these users can be managed externally to your application, it's not always possible to manage their access if they are already logged in.

This package not only allows you to define groups your users must belong to in order to authenticate, but will also ensure that those groups continue to exist throughout a user's authenticated session, not just at the time of authentication i.e. when they log in.

Installation

composer require dyrynda/laravel-ldap

Once the package is installed, publish the configuration file

php artisan vendor:publish --tag="laravel-ldap"

Configuration

The three keys you are likely to change are allowed_groups, username, and password_expiry_threshold.

Usage

In order to restrict authentication of users to your application using the allowed_groups key, add the GroupAccessScope to the scopes key of the adldap_auth configuration file. A user will only be able to authenticate if they are a member of each group defined in the allowed_groups array.

This scope will ensure that users can only login if they are members of the given groups, but does nothing to protect your application from users that are already logged in from accessing it should their access be revoked in the directory server.

To combat this, you can add the following to to the $routeMiddleware property of your app/Http/Kernel.php.

'ldap' => \Dyrynda\Ldap\Http\Middleware\LdapMiddleware::class

This middleware can then be applied to your routes to ensure the following:

Should any of these conditions evaluate to false, the user will be logged out and directed to login to your application again.

Updated password

If you wish to log users out based on their password being updated, you must cache the timestamp which marks the last time the password was updated (on login). When the value in LDAP is newer than the value in your application's cache, the user will be logged out.

If the configured password_expiration_field attribute does not exist on your User model, this check will be skipped.

You will need to configure modify the adldap_auth.php configuration file to sync the pwdlastset value from LDAP.

Ensure you have a the corresponding database field configured.

Testing

By default ldap is enabled for testing, this can be toggled within the config laravel_ldap.php

Lastly, update the password_expiration_field (if not using the default password_updated_at) in your laravel_ldap.php configuration file.

Support

If you are having general issues with this repository, feel free to contact me on Twitter.

If you believe you have found an issue, please report it using the GitHub issue tracker, or better yet, fork the repository and submit a pull request.

If you're using this repository, I'd love to hear your thoughts. Thanks!


All versions of laravel-ldap with dependencies

PHP Build Version
Package Version
Requires illuminate/support Version ^7.0
adldap2/adldap2-laravel Version ^6.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 dyrynda/laravel-ldap contains the following files

Loading the files please wait ....