$header_decode = base64_decode($header);
//$header_decode这个得出来的是字符串,下面的这个步骤再转为字符串,应该得不到数组吧,json_encode是否应该更改为:json_decode
$header_json =json_encode($header_decode);
另外就是:JWT::decode($jwt, $pubkey, array($header_json['alg']));更改为:
JWT::decode($jwt, new Key("-----BEGIN CERTIFICATE-----\n".$header_json['x5c'][0]."\n-----END CERTIFICATE-----", $header_json['alg']));也许会方便一些
