You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/03/09 05:29:40 UTC

[GitHub] [incubator-apisix] paoying commented on a change in pull request #1224: support base64 secret for jwt auth

paoying commented on a change in pull request #1224: support base64 secret for jwt auth
URL: https://github.com/apache/incubator-apisix/pull/1224#discussion_r389469075
 
 

 ##########
 File path: lua/apisix/plugins/jwt-auth.lua
 ##########
 @@ -75,7 +82,11 @@ function _M.check_schema(conf)
     end
 
     if not conf.secret then
-        conf.secret = core.id.gen_uuid_v4()
+        if base64_secret then
+            conf.secret = ngx_encode_base64(resty_random.bytes(32))
 
 Review comment:
   changed to use rest_random to generate ascii secret

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services