akaunting 3.0 (the last dance)
This commit is contained in:
20
app/Http/Middleware/AuthenticateOnceWithBasicAuth.php
Normal file
20
app/Http/Middleware/AuthenticateOnceWithBasicAuth.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class AuthenticateOnceWithBasicAuth
|
||||
{
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle($request, $next)
|
||||
{
|
||||
return Auth::onceBasic() ?: $next($request);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user