-
-
Notifications
You must be signed in to change notification settings - Fork 1
Same results every time #12
Description
I have followed the instructions to the letter for ldaprecord in the authentication section using Laravel UI (deprecated).
https://ldaprecord.com/docs/laravel/auth/laravel-ui/
I am using Laravel 7x.
I am using username, not email for authentication.
At first I was getting an error about a model index not being present. So I revised the providers section of auth.php to this
` 'providers' => [
'ldap' => [
'driver' => 'ldap',
'model' => LdapRecord\Models\ActiveDirectory\User::class,
'database' => [
'model' => App\Ldap\User::class,
'sync_attributes' => [
'name' => 'cn',
'username' => 'samaccountname',
'email' => 'mail',
],
],
],
'users' => [
'driver' => 'eloquent',
'model' => App\User::class,
],`
My LoginController has the following:
`use Illuminate\Http\Request;
public function username()
{
return 'username';
}
protected function credentials(Request $request)
{
return [
'samaccountname' => $request->username,
'password' => $request->password,
];
}`
Like I said, I followed the instructions correctly up to before the "Fallback Authentication". No matter what I do I continue to get "These credentials do not match our records."
When I run the test (php artisan ldap:test) I get a successful connection. I know the credentials I am using are correct. I am at a loss on what I need to do.
Please help.
Cy