Skip jwt token security when impersonating

This commit is contained in:
Julien Nahum 2024-03-21 17:55:15 +01:00
parent 75cc4b19e1
commit 31e5624aec
1 changed files with 5 additions and 0 deletions

View File

@ -32,6 +32,11 @@ class AuthenticateJWT
}
}
// If it's impersonating, skip the rest
if ($payload->get('impersonating')) {
return $next($request);
}
$error = null;
if (! \Hash::check($request->ip(), $payload->get('ip'))) {
$error = 'Origin IP is invalid';