Open seatechdev opened 6 years ago
Hi there :)
Route::group(['middleware' => ['jwt.auth']], function() { Route::get('logout', 'AuthController@logout'); Route::get('test', function(){ return response()->json(['foo'=>'bar']); }); });
I don't understand?
You want to use JWT Auth and Laravel's basic Auth?
Yes. The reason is that I don't want to use a javascript based framework such as angular for my desktop. Even though it is much easier for it to do it at this point.
Subject of the issue
I am looking for some help to enable Basic Auth with JWT without Dingo or Passport support. This is done to build a web client without using Angular or another javascript framework. Right now in every controller, I am using the middleware as follows: class SomeController extends Controller { public function __construct() { $this->middleware('jwt.auth', ['except' => ['someothercontroller']]); } }
Question: Is there a way to put the JWT middleware in the routes instead of the controller so that I can run both basic and JWT auth on the app.