SkyeYoung commented on code in PR #12611:
URL: https://github.com/apache/apisix/pull/12611#discussion_r2342866858


##########
apisix/plugins/jwt-auth.lua:
##########
@@ -144,8 +142,9 @@ function _M.check_schema(conf, schema_type)
         return false, err
     end
 
-    if conf.algorithm ~= "RS256" and conf.algorithm ~= "ES256" and not 
conf.secret then
-        conf.secret = ngx_encode_base64(resty_random.bytes(32, true))
+    if (conf.algorithm == "HS256" or conf.algorithm == "HS512") and not 
conf.secret then

Review Comment:
   Adjust to be consistent with the document
   
   
https://github.com/apache/apisix/pull/12611/files#diff-3cd5fc846614f1e59961d065c6f32dca0b2d6cc3ef549e7a961dd4b3694a74bc
   
   <img width="2242" height="324" alt="Image" 
src="https://github.com/user-attachments/assets/296643cf-1143-4fcd-ac57-8d343a52bbb7";
 />



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to