brille24 / sylius-ldap-plugin
Plugin to integrate with LDAP authentication.
Installs: 30 735
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 5
Forks: 6
Open Issues: 2
Type:sylius-plugin
Requires
- php: ^8.0
- sylius/mailer-bundle: ^1.8 || ^2.0@beta
- sylius/sylius: ^1.11
- symfony/ldap: ^5.4 || ^6.0
- symfony/webpack-encore-bundle: ^1.15
Requires (Dev)
- behat/behat: ^3.6.1
- behat/mink-selenium2-driver: ^1.4
- dmore/behat-chrome-extension: ^1.3
- dmore/chrome-mink-driver: ^2.7
- friends-of-behat/mink: ^1.8
- friends-of-behat/mink-browserkit-driver: ^1.4
- friends-of-behat/mink-debug-extension: ^2.0.0
- friends-of-behat/mink-extension: ^2.4
- friends-of-behat/page-object-extension: ^0.3
- friends-of-behat/suite-settings-extension: ^1.0
- friends-of-behat/symfony-extension: ^2.1
- friends-of-behat/variadic-extension: ^1.3
- phpspec/phpspec: ^7.2
- phpstan/extension-installer: ^1.0
- phpstan/phpstan: ^1.8.1
- phpstan/phpstan-doctrine: 1.3.40
- phpstan/phpstan-strict-rules: ^1.3.0
- phpstan/phpstan-webmozart-assert: ^1.2.0
- phpunit/phpunit: ^9.5
- polishsymfonycommunity/symfony-mocker-container: ^1.0
- sylius-labs/coding-standard: ^4.2
- symfony/browser-kit: ^5.4 || ^6.0
- symfony/debug-bundle: ^5.4 || ^6.0
- symfony/dotenv: ^5.4 || ^6.0
- symfony/flex: ^2.2.2
- symfony/intl: ^5.4 || ^6.0
- symfony/web-profiler-bundle: ^5.4 || ^6.0
- vimeo/psalm: 5.14.1
This package is auto-updated.
Last update: 2024-12-14 12:39:52 UTC
README
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: