shreemaan-abhishek commented on code in PR #8660:
URL: https://github.com/apache/apisix/pull/8660#discussion_r1073068637


##########
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:
   should we add a nil check there? I think we should. Even the previous 
implementation would return nil in some cases. Not sure why it is not being 
checked.



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