apisix-dashboard icon indicating copy to clipboard operation
apisix-dashboard copied to clipboard

bug: when enable jwt-auth plugin on dashabord, can't get the token of jwt-auth

Open idbeta opened this issue 5 years ago • 3 comments

Bug report

when enable jwt-auth plugin on dashabord, can't get the token of jwt-auth

A clear and concise description of what the bug is.

How to Reproduce

  1. create consumer with jwt-auth
Request URL: http://127.0.0.1:9000/apisix/admin/consumers
Request Method: PUT
Request Body: {"username":"test_jwt","plugins":{"jwt-auth":{"disable":false,"exp":86400,"key":"user-key","secret":"my-secret-key"}}}
Response: {"code":0,"message":"","data":null,"request_id":"07e5ef1a-061c-4649-a834-b6bff8b29440"}
  1. get the token of jwt-auth
$ curl http://127.0.0.1:9080/apisix/plugin/jwt/sign?key=user-key -i
HTTP/1.1 500 Internal Server Error
Date: Mon, 04 Jan 2021 06:10:50 GMT
Content-Type: text/plain; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Server: APISIX/2.1

failed to sign jwt

idbeta avatar Jan 04 '21 06:01 idbeta

has been fixed by https://github.com/apache/apisix/pull/3185

#1195 is test cases to confirm it.

nic-chen avatar Jan 05 '21 02:01 nic-chen

done?

juzhiyuan avatar Jan 05 '21 08:01 juzhiyuan

done?

yes

idbeta avatar Jan 05 '21 08:01 idbeta