spacewander commented on code in PR #8660:
URL: https://github.com/apache/apisix/pull/8660#discussion_r1089581139


##########
apisix/plugins/jwt-auth.lua:
##########
@@ -274,32 +234,16 @@ end
 local function get_rsa_or_ecdsa_keypair(conf, consumer_name)
     local public_key = conf.public_key
     local private_key = conf.private_key
-    -- if keys are present in conf, no need to query vault (fallback)
+
     if public_key and private_key then
         return public_key, private_key
+    elseif public_key and not private_key then
+        return public_key, nil, "missing private key"

Review Comment:
   
https://github.com/apache/apisix/blob/9c899b87648039e2c6c73b087d627aea2df90f55/apisix/plugins/jwt-auth.lua#L347
   Here we check if public_key is nil to detect the err.



-- 
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: notifications-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to