for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Mpociot\Reauthenticate\Middleware;
use Closure;
use Mpociot\Reauthenticate\ReauthLimiter;
class Reauthenticate
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
$reauth = new ReauthLimiter($request);
if (!$reauth->check()) {
$request->session()->set('url.intended', $request->url());
return $this->invalidated($request);
}
return $next($request);
* Handle invalidated auth.
protected function invalidated($request)
$request
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
return redirect('auth/reauthenticate');
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.