October: Can't find LDAP Module

Created on 2 Feb 2020  Â·  18Comments  Â·  Source: octobercms/october

  • OctoberCMS Build: Last available.
  • PHP Version: 7.3
  • Database Engine: PgSQL
  • Plugins Installed: None yet

    Description:

I want to install a plugin LDAP to my OctoberCMS.
Because I didn't find this plugin, I try to download this : https://github.com/khoatran/october-ldap

But I don't know how to install it .

Can you help me ?

Thanks

Question

All 18 comments

GitHub issues really isn't the place for questions like this. Please use one of the many other avenues available instead of submitting new issues for your questions.

Forum: https://octobercms.com/forum
StackOverflow: https://stackoverflow.com/questions/tagged/octobercms
Discord: https://discord.gg/6S777kh

To answer your question, you need to add the plugin into the plugins folder. If you download a ZIP of that plugin and put it into plugins/khoatd/ldap, it should load. However, given that it appears that the plugin has been taken off the marketplace, it may no longer be supported.

To answer your question, you need to add the plugin into the plugins folder. If you download a ZIP of that plugin and put it into plugins/khoatd/ldap, it should load. However, given that it appears that the plugin has been taken off the marketplace, it may no longer be supported.

I cannot get to work . Issues with librarie conflict. Can you confirm It still work on current version of oct cms ?

@lucacalcaterra you'd probably be better off writing a plugin wrapper for https://github.com/DirectoryTree/LdapRecord-Laravel targeting the L6 branch of October (which should be released in a couple weeks.

@LukeTowers thanks.. i used ldaprecord on laravel but don't know where to start to build a wrapper for use It in octobercms . Must override Back auth ?

@lucacalcaterra you'd probably be better off writing a plugin wrapper for https://github.com/DirectoryTree/LdapRecord-Laravel targeting the L6 branch of October (which should be released in a

@lucacalcaterra you'd probably be better off writing a plugin wrapper for https://github.com/DirectoryTree/LdapRecord-Laravel targeting the L6 branch of October (which should be released in a couple weeks.

Adding the package with composer in my plugin i get the following error (i understood that oc not use laravel auth system). How to fix It?

In Container.php line 805:

Target class [auth] does not exist.

In Container.php line 803:

Class auth does not exist

@lucacalcaterra see https://github.com/LukeTowers/oc-azureadsso-plugin/blob/master/helpers.php for how I solved that in my AzureADSSO plugin.

@lucacalcaterra see https://github.com/LukeTowers/oc-azureadsso-plugin/blob/master/helpers.php for how I solved that in my AzureADSSO plugin.

Ok . I'll try ... i not know so much well Laravel .
For example... i must include this in boot ? More in general what i need in my plugin.php for start ? I created basic skeleton copying some code
https://github.com/LukeTowers/oc-azureadsso-plugin/blob/b5242760d0cb0af5d78ebdf455b2c03c7e843ef5/Plugin.php#L42

Yeah, that line would probably help. Not sure what else you'd need. helpers.php is automatically loaded so you can use that file too.

Yeah, that line would probably help. Not sure what else you'd need. helpers.php is automatically loaded so you can use that file too.

I Cannot understand what the class [auth] refers to (?). Need a middleware or what else ?

If i use the package ldaprecord (non laravel ) can semplify things or not ? Tnx !

No idea without trying it myself. You're going to have to be willing to learn more about how Laravel and October work behind the scenes if you want to integrate a custom authentication layer; or pay someone else to do it for you.

Thanks for your reply... I'll need to learn, but web dev is not my principal work

@lucacalcaterra see https://github.com/LukeTowers/oc-azureadsso-plugin/blob/master/helpers.php for how I solved that in my AzureADSSO plugin.

Hi Luke, i'm target ldaprecord on a l6 branch of ocs. Tha laravel packages autoload two service provider, one for Ldap search and another for LdapAuth. LdapAuthServiceProvider search for auth class that doesn't exists on ocs because doesn't use the laravel standard auth mechanism. Anyway the ldaprecord autoload the serviceprovider generating error. How can skip the autodiscovery of the providers avoiding it's loaded on storage cache packages.php ?

Thanks! Luca

@lucacalcaterra you can add the package names that it's autodiscovering to your project's composer.json's extra.laravel.dont-discover array and then run php artisan package:discover to remove the breaking ones. Note that we're currently working on a PR to completely disable the autoloading behaviour by default in October since it seems to cause a lot more trouble than it's worth: https://github.com/octobercms/library/pull/492

Already done befor wrote to you... added the array in composer but seems
to have no effect, package is anyway discovered.

"extra": {
"laravel": {
"dont-discover": [
"directorytree/ldaprecord-laravel"
]
}
}

λ php artisan package:discover
Discovered Package: directorytree/ldaprecord-laravel
Discovered Package: jenssegers/date
Discovered Package: laravel/tinker
Discovered Package: nesbot/carbon

Il giorno mar 23 giu 2020 alle ore 17:39 Luke Towers <
[email protected]> ha scritto:

@lucacalcaterra https://github.com/lucacalcaterra you can add the
package names that it's autodiscovering to your project's composer.json's
extra.laravel.dont-discover array and then run php artisan package:discover
to remove the breaking ones. Note that we're currently working on a PR to
completely disable the autoloading behaviour by default in October since it
seems to cause a lot more trouble than it's worth: octobercms/library#492
https://github.com/octobercms/library/pull/492

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/octobercms/october/issues/4927#issuecomment-648245083,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAGWZUIZZ7RXE4S5UH2C433RYDEETANCNFSM4KO3UE3A
.

@lucacalcaterra did you put it in the project's composer.json? If it's in the plugin's composer.json it won't be detected.

@lucacalcaterra did you put it in the project's composer.json? If it's in the plugin's composer.json it won't be detected.

Tried. Now it's ok, but .., how do I make the plugin independent from the composer.json of oc repo on root ?

You'll have to wait for https://github.com/octobercms/library/pull/492 to be merged, which shouldn't be too long. For now just keep the dependency in the plugin's composer.json file and the dont-discover in the project's composer.json file.

Feel free to add your comments to that PR.

Was this page helpful?
0 / 5 - 0 ratings