At my organization we have an OpenLDAP server which stores user's password. We also have another MySQL database which stores user's information. Therefore when we want to authenticate user we authenticate with LDAP and then retrieve user's information from MySQL database.
Things look good so far with Laravel authentication which separates guards and providers. In our case we would use LDAP authentication as guard and eloquent provider to retrieve data from MySQL.
Now we want to implement an API authentication using Laravel Passport, but all tutorials that I have seen all use authenticatable users. But we cannot do that because passwords are not in the database and users cannot be authenticatable.
Could anyone suggest how to use Laravel Passport in this case?
use Authenticatable
and overload the method that recovers the passwordgetAuthPassword()
– N69S