mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 04:20:49 +08:00
oauth basic
This commit is contained in:
@@ -11,6 +11,7 @@ use Illuminate\Validation\UnauthorizedException;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
use Throwable;
|
||||
use Laravel\Passport\Exceptions\AuthenticationException as PassportAuthenticationException;
|
||||
|
||||
class Handler extends ExceptionHandler
|
||||
{
|
||||
@@ -48,6 +49,9 @@ class Handler extends ExceptionHandler
|
||||
return abort(403);
|
||||
}
|
||||
});
|
||||
$this->renderable(function (PassportAuthenticationException $e) {
|
||||
return response()->redirectTo(getSchemeAndHttpHost() . "/login.php");
|
||||
});
|
||||
|
||||
//Other Only handle in json request
|
||||
if (!request()->expectsJson()) {
|
||||
|
||||
Reference in New Issue
Block a user