Download the PHP package jstormes/ldap without Composer

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

LdapConnector

LDAP Connector – A quick way to login and get user details from a LDAP AD or Open LDAP server.

As part of creating a Single Sign On (SSO) solution to Open LDAP and Active Directory (AD) I needed to validate users against their LDAP User Name and Password. I also wanted to pull some basic user information like their display name, Email address and Group Membership.

This composer package provides that very limited LDAP functionality, implemented with a consistent interface across both AD and Open LDAP.

This package also forces TLS only connections to the LDAP server. The public certificate for the LDAP server MUST be available to the PHP server's chain of trust.

TODO:

add password change:

Found hint as to how at

https://stackoverflow.com/questions/997424/active-directory-vs-openldap

CLI Testing Quick Start

Make sure you have Docker and Docker Compose installed.

PHPStorm Testing Quick Start

Usage Example

Interactive Testing

The interactive testing code is in bin\test_ldap.php.

To test with your own LDAP setup change the line LDAP_SERVER: LOOPBACK:us.loopback.world:DC=us,DC=loopback,DC=world:OpenLDAP in the file docker-compose.yml to point to your own server and restart the docker-compose command.

This Interactive Testing session uses XDebug, change the XDebug line to match your setup.

Mock LdapAdapters

The LdapAdapter is mostly a wrapper for code that is difficult to unit test. To make TDD simpler, I created mock versions of this hard to unit test code.

Two versions of the LdapAdapter were created. The first, LdapAdMockAdapter.php is for mocking a connection to a Microsoft Active Directory LDAP server. The accepted bind and the returned search results simulate a connection to Microsoft AD over LDAP.

The second mock LdapOpenLdapMockAdatper.php, simulates a connection to a Open LDAP server.

Using both mocks it was possible to do TDD using these mocks as stand ins for the real LDAP servers.


All versions of ldap with dependencies

PHP Build Version
Package Version
Requires php Version ^7.0
ext-ldap Version *
psr/log Version ^1.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 jstormes/ldap contains the following files

Loading the files please wait ....