Closed riyazpt closed 5 years ago
My configrations was wrong .I have corrected .Now (Adldap::auth()->attempt() returns true Now I am using NodatabaseSync protected function attemptLogin(Request $request) {
if(Adldap::auth()->attempt($userdn, $password, $bindAsUser = true)) {
dd(Auth::user());//Returns Null
dd(Adldap::search()->users()->find('riyas'));//Returns null
return true;
} else { return false; } } with exact username & password it is authenticating returns true
I couldn't get exact user Auth::user();after authentication
Sorry but this multi-auth setup goes beyond the scope of this tutorial and also beyond my knowledge of Laravel. Closing issue.
I am using Laravel 5.4. There are two types of user in my system. Admin &User. Both have separate database tables .To authenticate ,I have implemented laravel multi auth with custom user provider(mD5) hashed password. Now a situation arose. Same login screen(routing ) for both 'user' and 'admin' . Procedure to Authenticate
So far I have implemented Laravel multi auth system .
I have made following changes in config in .env file ADLDAP_CONNECTION=default ADLDAP_CONTROLLERS=abc.local ADLDAP_BASEDN=dc=abc,dc=local ADLDAP_USER_ATTRIBUTE=uid ADLDAP_USER_FORMAT=uid=%s,dc=abc,dc=local
Now in LoginController ,
which returns TRUE.
but when I try, protected function attemptLogin(Request $request) { $doamin="abc";
}
with exact username & password it is not authenticating returns false .