ayobamilaye
ayobamilaye

Reputation: 459

Laravel - How to combine Active Directory Authentication with User Authentication

I am using Laravel 5.8 for authenticating users from database. Presently, I can login and authenticate the users from the application and database. However, I want to have a mixed authentication whereby I can also authenticate some users from Active Director. That is,

  1. Some users can be registered directly from the application, saved into the database and then login.

  2. Some users can be imported from Active Directory and they can also login.

How do I achieve this?

adldap error

Thank you.

Upvotes: 2

Views: 11081

Answers (1)

Sergey Bogdanov
Sergey Bogdanov

Reputation: 671

Probably you can use ldap extensions for php/laravel:

composer require adldap2/adldap2-laravel

Using that you can import ldap users and work with them like Eloquent users. Documentation here.

Upvotes: 2

Related Questions