PHP-027 / Advanced
Not fixing the algorithm during JWT verification (alg none or key confusion)
Why is this a problem?
Trusting the header's alg can disable signature checking or allow a public key to be used as an HMAC key.
How to fix it
php
$payload = JWT::decode($token, new Key($publicKey, 'RS256')); // Fix the allowed algorithm