liujianri edited a comment on issue #1297: bug: jwt plugin make the request 
http StatusCode= 500
URL: 
https://github.com/apache/incubator-apisix/issues/1297#issuecomment-601060640
 
 
   这个问题 是因为在resty.jwt.lua 中取header中的alg时,是header.alg 这样取出来的,问题就出在传入的jwt 
token的header 部分,出现这个问题的时候检查一下jwt token 的header部分 看看header.alg 
是不是nil,注意这个里面的key是区分大小写的哦。
   正确的应该是 :
   `{
     "alg": "HS256",
     "typ": "JWT"
   }`
   错误的:
   `{
     "Alg": "HS256",
     "Typ": "JWT"
   }`
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to