Download the PHP package anthonyedmonds/laravel-ldap-emulator without Composer

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

Laravel LDAP Emulator

Automatically boot an LDAP emulator while working in a local environment.

Built for Laravel.

Based on the LDAP emulation provided by LDAP Record.

Supports roles provided by Spatie's Laravel Permission.

Installation

Add the library via Composer: composer require anthonyedmonds/laravel-ldap-emulator --dev

Add the LdapEmulatorServiceProvider to bootstrap/providers.php:

If you are manually loading service providers, LdapEmulatorServiceProvider must be loaded after LdapRecord\Laravel\LdapServiceProvider.

Once installed, export the config: php artisan vendor:publish --provider="AnthonyEdmonds\LaravelLdapEmulator\Providers\LdapEmulatorServiceProvider"

Configuration

All configuration can be performed in the published config/ldap-emulator.php file.

Config Key .env key Expected Description
enabled LDAP_EMULATOR_ENABLED bool Whether the emulator is enabled
laravel-user-model string The fully qualified name of the Laravel User model
laravel-username-key string Which attribute is used to identify the local User
password string What to set the default local password to
ldap-user-model string The fully qualified name of the LdapRecord User model
ldap-username-key string Which attribute is used to identify the LDAP User
users array The users to add to LDAP and the local system

Further instructions on setting up users are provided in the comments.

Usage

When the APP_ENV key of your system is set to local an LDAP emulator instance is started.

Beyond configuring the pool of users to add, the system will operate as if it had an LDAP server connected.

Imported users will not be updated once they have been created, however they can be synced when they sign in if LdapRecord is set up to do so.

Note that there some limitations to the functionality of the emulator, which are described here.

Authentication

When a call to Auth::attempt() is made, the Attempting event is fired and the LdapUser attempting to log in will be allowed to sign-in.

If you use a library that first calls Auth::validate(), such as Laravel Fortify, you will need to call the setActingUser() method first:

Roadmap

Raise a ticket with your ideas and suggestions, or raise a pull request with your contributions.


All versions of laravel-ldap-emulator with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
directorytree/ldaprecord-laravel Version ^3
spatie/laravel-permission Version ^6
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 anthonyedmonds/laravel-ldap-emulator contains the following files

Loading the files please wait ....