Skip to content

Commit 31e5624

Browse files
committed
Skip jwt token security when impersonating
1 parent 75cc4b1 commit 31e5624

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

app/Http/Middleware/AuthenticateJWT.php

+5
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ public function handle(Request $request, Closure $next)
3232
}
3333
}
3434

35+
// If it's impersonating, skip the rest
36+
if ($payload->get('impersonating')) {
37+
return $next($request);
38+
}
39+
3540
$error = null;
3641
if (! \Hash::check($request->ip(), $payload->get('ip'))) {
3742
$error = 'Origin IP is invalid';

0 commit comments

Comments
 (0)