-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
key-auth plugin error when creating new keys - "unsupported media type" - change of behavior #1182
Comments
I get same error with jwt
|
I'm also encountering this behavior on |
or specifying the content type as "application/x-www-form-urlencoded" works as well |
I get same error with jwt
|
fixed by #1359 |
Thanks @jixiaod Came here after encountering the issue following the jwt plugin docs. It may help others if that page is updated with the solution mentioned here. |
Still getting this error in key-auth. Kong version 0.9.5
but works if I add -d flag: Same error when using http on OS X:
But works if I pass empty 'key' in body: |
I am getting this with Kong 0.9.7 on OS X using curl. @mdan1eli suggested specifying Content-Type header and that worked for me. I too came here after having trouble with the JWT documentation.
|
I had a look at what should be accepted, and came up with the following;
|
Updated to 0.9.7 and passing a blank object to body: it works fine now. Thank you! |
This has been fixed in #3077! It will be part of the 0.12 release :) Thanks for reporting! |
Hi, recently upgraded to 0.8.0 and the behavior for the key-auth key creation on a consumer appears to have changed. The documentation (and previous behavior) asks for the following command to generate an apikey for a user:
curl -X POST http://localhost:8001/consumers/{consumer}/key-auth
This worked on the previous version I was running (0.7.0?) but now that command returns the following:
I found if I add an empty POST body it happily generates the key in the same way it used to.
curl -X POST http://localhost:8001/consumers/{consumer}/key-auth -d ""
Not sure if this is intentional and the plugin documentation is now lagging behind, or if this has cropped up since the update to 0.8.0. If it matters I'm running this on postgres.
Thanks!
Matt
The text was updated successfully, but these errors were encountered: