Haufe-Lexware / wicked.haufe.io

An API Management system based on Mashape Kong
http://wicked.haufe.io
Other
123 stars 37 forks source link

Response from Auth endpoints come as HTML instead of JSON #359

Open marcopacurariu3 opened 1 year ago

marcopacurariu3 commented 1 year ago

Hello,

While calling the Wicked API endpoint /auth/local/api/search/token with an invalid scope, the response from the client is in HTML format. That is because, if an endpoint is called in a browser (also for example to get a 404), there is a pretty format, being HTML. However, usually the clients are using API REST calls and it would be more suitable to have a JSON response.

One other solution would be to allow configuration of the response type.