mardi 17 avril 2018

Laravel Middleware Signed Routes and URLs

In my Routes I have videos/{id} I want to use a Signed URL, which works fine, but I want also to access the page if logged as admin.

I'm trying to make them work together, if Admin access the route videos/{id} or if URL videos/3?company=Public&signature=031d35fe005ce696dcf8e7ae0c28c911f7d18138aeeb0800fd61863b7b5a39ed

middleware('signed','role:superadministrator|administrator')

it returns invalid signature

Route::get('/videos/{id}', 'VideoController@show', function (Request $request, $id, $user, $company) {
  if (! $request->hasValidSignature()) {
    abort(401);
  }
})->name('video')->middleware('signed','role:superadministrator|administrator');



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire