-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Introduce an Ldap factory in the authentication plugin #39661
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
obuisard
merged 22 commits into
joomla:4.3-dev
from
Digital-Peak:authentication/ldap/factory
Jan 28, 2023
Merged
Changes from 19 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
299128c
Converts the authentication plugins to service providers
laoneo 415fbc1
adapt test
laoneo 558f6dd
variable
laoneo 1848736
Merge branch '4.3-dev' into provider/authentication
laoneo fa65057
Merge branch '4.3-dev' into provider/authentication
laoneo c6c61b4
cs
laoneo 0a8c3d6
Introduce an Ldap factory in the authentication plugin
laoneo 09bdfb9
cs
laoneo 2274284
cs
laoneo 71d7a76
Merge remote-tracking branch 'upstream/4.3-dev' into authentication/l…
laoneo 9a08371
cleanup
laoneo e2a0cbd
typed
laoneo 64706b4
Merge branch '4.3-dev' into authentication/ldap/factory
laoneo 737e356
merge
laoneo 25deb6f
compare
laoneo 632975b
Merge branch '4.3-dev' into authentication/ldap/factory
laoneo fe310ca
move
laoneo 0532083
Restore test
laoneo 2fc4bdd
year
laoneo c055429
Update plugins/authentication/ldap/src/Extension/Ldap.php
laoneo 766a5ad
service
laoneo be2641e
Merge branch '4.3-dev' into authentication/ldap/factory
laoneo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| <?php | ||
|
|
||
| /** | ||
| * Joomla! Content Management System | ||
| * | ||
| * @copyright (C) 2023 Open Source Matters, Inc. <https://www.joomla.org> | ||
| * @license GNU General Public License version 2 or later; see LICENSE | ||
| */ | ||
|
|
||
| namespace Joomla\Plugin\Authentication\Ldap\Factory; | ||
|
|
||
| use Symfony\Component\Ldap\Ldap; | ||
| use Symfony\Component\Ldap\LdapInterface; | ||
|
|
||
| // phpcs:disable PSR1.Files.SideEffects | ||
| \defined('JPATH_PLATFORM') or die; | ||
| // phpcs:enable PSR1.Files.SideEffects | ||
|
|
||
| /** | ||
| * Factory to create Ldap clients. | ||
| * | ||
| * @since __DEPLOY_VERSION__ | ||
| */ | ||
| class LdapFactory implements LdapFactoryInterface | ||
| { | ||
| /** | ||
| * Method to load and return an Ldap client. | ||
| * | ||
| * @param array $config The configuration array for the ldap client | ||
| * | ||
| * @return LdapInterface | ||
| * | ||
| * @since __DEPLOY_VERSION__ | ||
| * | ||
| * @throws \Exception | ||
| */ | ||
| public function createLdap(array $config): LdapInterface | ||
| { | ||
| return Ldap::create('ext_ldap', $config); | ||
| } | ||
| } |
36 changes: 36 additions & 0 deletions
36
plugins/authentication/ldap/src/Factory/LdapFactoryInterface.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| <?php | ||
|
|
||
| /** | ||
| * Joomla! Content Management System | ||
| * | ||
| * @copyright (C) 2023 Open Source Matters, Inc. <https://www.joomla.org> | ||
| * @license GNU General Public License version 2 or later; see LICENSE | ||
| */ | ||
|
|
||
| namespace Joomla\Plugin\Authentication\Ldap\Factory; | ||
|
|
||
| use Symfony\Component\Ldap\LdapInterface; | ||
|
|
||
| // phpcs:disable PSR1.Files.SideEffects | ||
| \defined('JPATH_PLATFORM') or die; | ||
| // phpcs:enable PSR1.Files.SideEffects | ||
|
|
||
| /** | ||
| * Factory to create Ldap clients. | ||
| * | ||
| * @since __DEPLOY_VERSION__ | ||
| */ | ||
| interface LdapFactoryInterface | ||
| { | ||
| /** | ||
| * Method to load and return an Ldap client. | ||
| * | ||
| * @param array $config The configuration array for the ldap client | ||
| * | ||
| * @return LdapInterface | ||
| * | ||
| * @since __DEPLOY_VERSION__ | ||
| * @throws \Exception | ||
| */ | ||
| public function createLdap(array $config): LdapInterface; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.