https://github.com/brille24/syliusldapplugin
LDAP integration for Sylius E-Commerce
https://github.com/brille24/syliusldapplugin
ldap ldap-authentication sylius sylius-plugin symfony
Last synced: 11 months ago
JSON representation
LDAP integration for Sylius E-Commerce
- Host: GitHub
- URL: https://github.com/brille24/syliusldapplugin
- Owner: Brille24
- Created: 2019-09-21T08:22:01.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-01-21T10:47:13.000Z (over 1 year ago)
- Last Synced: 2025-07-15T20:20:11.146Z (11 months ago)
- Topics: ldap, ldap-authentication, sylius, sylius-plugin, symfony
- Language: PHP
- Homepage:
- Size: 604 KB
- Stars: 2
- Watchers: 4
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
Sylius - LDAP Plugin
Plugin for integrating Sylius with LDAP.
**When using instead of the Sylius form login, you will not be able to log in with existing users into Sylius.**
## Installation
Run `composer require brille24/sylius-ldap-plugin` in your project-root.
## Configuration
Add this block to the parameters in your env-file and fill out the parameters.
Your env file will most probably be `.env.local`. If that file does not exist, copy it from `.env` to `.env.local` and fill in the block of parameters below.
```
###> sylius/ldap-plugin ###
LDAP_HOST='ldap.example.com'
LDAP_POST=389
LDAP_ENCRYPTION='ssl' # 'ssl', 'tls' or 'none'
LDAP_PASSWORD='[YOUR PASSWORD FOR READ-ONLY / LOOKUP-USER HERE]'
LDAP_QUERY_PARAMETER='uid'
LDAP_QUERY_STRING='uid={username}'
LDAP_LOOKUP_DN='cn=lookup-user,dc=example,dc=com'
LDAP_USER_QUERY_DN='dc=example,dc=com'
LDAP_GROUP_QUERY_DN='ou=groups,dc=example,dc=com'
###< sylius/ldap-plugin ###
```
To use this new method of authorizing users change the `form_login` in `config/packages/security.yaml` to `form_login_ldap`. For reference the plugin version of this configuration file is located under `tests/Application/config/packages/security.yaml`.
## Origin / Other Sources
This plugin is the result of the third sylius hackathon in oldenburg at brille24. It is based on `symfony/ldap`, so any guide for that package may also help you:
* [Ldap component](https://symfony.com/components/Ldap)
* [Authenticating against an LDAP server](https://symfony.com/doc/current/security/ldap.html)