Use Kong as an endpoint rather than proxy

Hi,

How can I implement an endpoint in Kong without having any upstream service? What I want to accomplish is basically the following:

authenticate the request (Basic Auth)
generate a JWT token and return the token back to requester.

Both of the above are possible using plugins and any upstream service is not really needed. Is there any way to implement such scenario?

Thanks,
Goris.

yes. implement a plugin that generates the token and returns. then, modify the url of the service to be “http://localhost” so that health checks pass.

(This is essentially what the request-terminator plugin does, so you can analyze that code for an example.)

Thanks, I’ll give it a try.


© 2019 Kong Inc.    Terms  •  Privacy  •  FAQ