🎉
This commit is contained in:
31
vendor/laravel/sanctum/src/Http/Middleware/CheckScopes.php
vendored
Normal file
31
vendor/laravel/sanctum/src/Http/Middleware/CheckScopes.php
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace Laravel\Sanctum\Http\Middleware;
|
||||
|
||||
use Laravel\Sanctum\Exceptions\MissingScopeException;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see \Laravel\Sanctum\Http\Middleware\CheckAbilities
|
||||
*/
|
||||
class CheckScopes
|
||||
{
|
||||
/**
|
||||
* Handle the incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @param mixed ...$scopes
|
||||
* @return \Illuminate\Http\Response
|
||||
*
|
||||
* @throws \Illuminate\Auth\AuthenticationException|\Laravel\Sanctum\Exceptions\MissingScopeException
|
||||
*/
|
||||
public function handle($request, $next, ...$scopes)
|
||||
{
|
||||
try {
|
||||
return (new CheckAbilities())->handle($request, $next, ...$scopes);
|
||||
} catch (\Laravel\Sanctum\Exceptions\MissingAbilityException $e) {
|
||||
throw new MissingScopeException($e->abilities());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user