Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

can not change key names in key-auth plugin #33

Closed
tumluliu opened this issue Mar 20, 2017 · 5 comments
Closed

can not change key names in key-auth plugin #33

tumluliu opened this issue Mar 20, 2017 · 5 comments

Comments

@tumluliu
Copy link

When creating or changing a key-auth plugin, the key names field does not work. It will keep blank no matter what I fill in. It seems that it has a default value function. But I am not sure. This is the request body after clicking the submit changes button:

{fields: {hide_credentials: {type: "boolean", default: false},…}, no_consumer: true}
fields: {hide_credentials: {type: "boolean", default: false},…}
anonymous: {type: "string", func: "function", default: ""}
default: ""
func: "function"
type: "string"
hide_credentials: {type: "boolean", default: false}
default: false
type: "boolean"
key_names: {type: "array", required: true, func: "function", default: "function"}
default: "function"
func: "function"
required: true
type: "array"
no_consumer: true

And the response:

{  
   "fields":{  
      "hide_credentials":{  
         "type":"boolean",
         "default":false
      },
      "key_names":{  
         "type":"array",
         "required":true,
         "func":"function",
         "default":"function"
      },
      "anonymous":{  
         "type":"string",
         "func":"function",
         "default":""
      }
   },
   "no_consumer":true
}

Actually, I met this already in version 0.4

@pantsel
Copy link
Owner

pantsel commented Mar 20, 2017

Hi @tumluliu,

Check this issue out: #7

You need to press enter after every key name you set

@tumluliu
Copy link
Author

Thank you for the hints, @pantsel
But, shouldn't the default value of the key_names be "apikey" instead of "function"?

@pantsel
Copy link
Owner

pantsel commented Mar 22, 2017

Kong doesn't provide a default key name in case you don't define one.

I am wondering where did this "function" thingy you mentioned came from. It is probably returned from Kong's admin API.

I will check it out and handle it properly if that's the case.

@tumluliu
Copy link
Author

tumluliu commented Mar 22, 2017 via email

@pantsel
Copy link
Owner

pantsel commented Mar 22, 2017

OK! It seems i didn't get that right.
Consider it fixed on the upcoming version this weekend.

Thanks again!

@pantsel pantsel closed this as completed Apr 3, 2017
hainguyen8y pushed a commit to hainguyen8y/konga that referenced this issue Aug 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants