benx203 edited a comment on issue #3594: URL: https://github.com/apache/apisix/issues/3594#issuecomment-820231118
You can consider use this: https://github.com/benx203/apisix/blob/jwt-auth-support-extension-payload/apisix/plugins/jwt-auth.lua demo: sign: `curl -G --data-urlencode 'payload={"aaa":"11","bb":"222"}' http://127.0.0.1:9080/apisix/plugin/jwt/sign?key=user-key -i` response: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhYWEiOiIxMSIsImtleSI6InVzZXIta2V5IiwiZXhwIjoxNjE4NTU4OTg2LCJiYiI6IjIyMiJ9.vwOMS2oeHU-H45rrwt1O2oPg8c7C8z9dDK0UzEhD3dk check up payload: `echo 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhYWEiOiIxMSIsImtleSI6InVzZXIta2V5IiwiZXhwIjoxNjE4NTU4OTg2LCJiYiI6IjIyMiJ9.vwOMS2oeHU-H45rrwt1O2oPg8c7C8z9dDK0UzEhD3dk' | cut -d '.' -f2 - | base64 --decode -` response: {"user_info":{"bb":"222","key":"user-key","exp":1618558986,"aaa":"11"}} -- 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]
