Closed asaadhoussam closed 6 years ago
Hi @asaadhoussam,
Since you're using Laravel 5.4, then you'll need to insert the Adldap\Laravel\AdldapAuthServiceProvider::class
as well inside your config/app.php
file to be able to publish the adldap_auth.php
file.
Hello Steve Thanks for your prompt reply my friend and for helping you to me I wish you success always
On Wed, Apr 11, 2018 at 12:13 AM, Steve Bauman notifications@github.com wrote:
Closed #518 https://github.com/Adldap2/Adldap2-Laravel/issues/518.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Adldap2/Adldap2-Laravel/issues/518#event-1567197924, or mute the thread https://github.com/notifications/unsubscribe-auth/AO_9suRR_H-civr9Akb0pc_Sld7AYujHks5tnSB_gaJpZM4TLHZq .
--
Hi Steve, I want to make an update on laravel 5.5 auth, I want to allows users to access to my application and make authenticate with a openLDAP server I work on windows and use composer with this require: *"require": { "php": ">=7.0.0", "adldap2/adldap2-laravel": "^4.0", "fideloper/proxy": "~3.3", "laravel/framework": "5.5.", "laravel/tinker": "~1.0" } 1- update migration like this: public function up() { Schema::create('users', function (Blueprint $table) { $table->increments('id'); $table->string('name'); $table->string('ldap_username')->unique( ); $table->string('email')->unique(); $table->string('password'); $table->datetime('deleted_at')->nullable(); $table->rememberToken(); $table->timestamps(); }); }** 2- Configure my LDAP settings in .env file:
ADLDAP_CONTROLLERS=ldap.orient.edu.lb ADLDAP_ADMIN_USERNAME=cn=admin,dc=orient,dc=lb ADLDAP_ADMIN_PASSWORD=password ADLDAP_BASEDN=dc=orient,dc=lb
3- and /config/adldap.php files: 'schema' => Adldap\Schemas\OpenLDAP::class,
'domain_controllers' => explode(' ', env('ADLDAP_CONTROLLERS', "ldap.orient.edu.lb")) 'base_dn' => env('ADLDAP_BASEDN', 'ou=staff,dc=orient,dc=lb')
'admin_username' => env('ADLDAP_ADMIN_USERNAME', 'admin') 'admin_password' => env('ADLDAP_ADMIN_PASSWORD', 'password')
4- update Illuminate\Foundation\Auth\AuthenticatesUsers file to use the ldap username instead of email address to login like this:
public function username( ) {
return ‘ldap_username’;
}
5- update login view file to use uid and username like this:
6- update adldap_auth file to:
'usernames' => [ ....
'ldap' => [ 'discover' => 'uid', 'authenticate' => 'cn', ], 'eloquent' => 'username', ....
/ 'windows' => [ 'discover' => 'samaccountname', 'key' => 'AUTH_USER', ], / ......
'sync_attributes' => [ 'username' => 'uid', 'name' => 'cn', ], ]
7- Result: nothing, No Login, No Error Message .. Only the login page appears again The attempt did not succeed, LDAP integration and managing to authenticate users against it failed Let me know where the error is / missing / modified/...?
thanks to your help
install config/app.php file ... updated Publish the auth configuration .. ok config/auth.php configuration file ... updated after installation: BASIC SETUP Inside your config/adldap_auth.php file there is a configuration option named usernames. this file not found under config directory !! where is the problem? How do we solve the problem?