I am currently working on a Laravel 4.2 app. I have implemented LDAP authentication with no user data in the database. Would it be possible to use the same LDAP driver with OctoberCMS? I suspect it should work fine if October is using the following interfaces for authentication:
Illuminate\Auth\UserInterface
Illuminate\Auth\UserProviderInterface
Illuminate\Auth\AuthManager
I am looking to move to a CMS for static page maintenance and many of the other features OctoberCMS has. However, I cannot take the time to rewrite the LDAP driver.
I made this work for me, I extended UserAccount in a small plugin, created a backend settings page for the ldap credentials and it was straightforward in the end. But I have a very simple use case; to authenticate a user against ldap and nothing else.
I made this work for me, I extended UserAccount in a small plugin, created a backend settings page for the ldap credentials and it was straightforward in the end. But I have a very simple use case; to authenticate a user against ldap and nothing else.
Thanks for your contribution, sqzaman21683
I have tried your code. It works but failed in my case. The problem with your example code is: the signin_onSubmit will be called twice.
First time, it will be called from your anonymous class in your plugin.
Second time, it will be called in the Auth controller class of backend module.
That being said: your approach will face to a big problem as the final call (Auth controller) will win. The mechanism of extending class cannot help to override completely the function signin_onSubmit
So, I would propose another approach and I have tested it successfully. My approach follows below steps:
Step 1: Inject a piece of Javascript code into the backend auth view to replace the action URL by the URL handled by your own controller class in your plugin.
Step 2: Implement your own controller plugin with whatever logic you want.
I will send the example code for you guys if you want to have a look for the reference.