Skip to content
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

Authentication (& General) Error Responses + Formats #1422

Closed
dvnkshl opened this issue Jul 19, 2016 · 2 comments
Closed

Authentication (& General) Error Responses + Formats #1422

dvnkshl opened this issue Jul 19, 2016 · 2 comments

Comments

@dvnkshl
Copy link

dvnkshl commented Jul 19, 2016

Is it possible to set custom error messages and response formats for auth errors (and others ideally) so they fit the same error format as our api?

Currently the default error message format from key auth plugin is

{"message":"No API Key found in headers, body or querystring"}

Ideally we'd like it to match the standard error format we have, so it would look similar to

{ "error": { "type": "authentication_error", "message": "You did not provide an API key. You need to provide your API key in the X-Authorization header (e.g. 'X-Authorization: YOUR_API_KEY')." }, "status_code": 401 }

Is this possible (without forking Kong and tweaking it + the plugins)?

Cheers

Devan

@Tieske
Copy link
Member

Tieske commented Jul 19, 2016

currently it is not possible.

@Tieske Tieske closed this as completed Jul 19, 2016
@sonicaghi
Copy link
Member

#972

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants