I have already researched the entire documentation but can find no way to make this AuthServiceProvider
work in Laravel 5.6 in the same way it works in Lumen 5.4.
Auth::viaRequest('api', function ($request) {
if (($userId = $request->headers->get('x-authenticated-userid')) && ($client_id = $request->headers->get('x-consumer-username'))) {
return User::where([['client_id', $client_id],['external_id', $userId]])->firstOrFail();
}
});