In kong, I have configured key-auth and JWT plugin on my api. In case of invalid credential or invalid token, request fallback to anonymous consumer having request-termination plugin. Hence, request terminates with status code and message configured in request-termination plugin.
Is there a way request-termination plugin terminates the request but still show validation messages coming out of key-auth or JWT plugin.
Issue I am facing is - how do I show invalid grant_type or token expired validations done by JWT plugin.
Steps To Reproduce
- create an api
- enable key-auth and JWT plugin on the api
- create a consumer, create key-auth credentials for it. Also, create RS256 algorithm based JWT credential for it.
- create an anonymous consumer. Create request-termination plugin for it.
- Specify Kong UUID of anonymous consumer in config.anonymous field value in key-auth and JWT plugin earlier enabled for the api.
- Additional Details & Logs
Kong version 0.14.1