Deactivate auth token

How to deactivate a previously issued token using client credential flow?

I assume you are using Kong OAuth 2.0 plugin. So, send DELETE request to /oauth2_tokens/:token_or_id on Kong Admin API.

thanks a lot. I was not able to find in doc. Can u point me doc link for same query ?

It does not explicitly talk about it here, certainly a PR to the documentation could be helpful in near future:

https://docs.konghq.com/plugins/oauth2-authentication/

But if you do know how to read code on any plugin Kong has built there is always an api.lua page that details out the uri’s and methods to read/create/modify/delete resources and in this case you can see it here:

https://github.com/Kong/kong/blob/master/kong/plugins/oauth2/api.lua

Over time when Kong can focus on documentation, full scope clarity can be achieved across all Kong functionality, but they are evolving/improving at a rapid rate right now and documentation can be hard to maintain (although they do their best!).

Ya I didn’t check code. Thanks a lot for tips.

1 Like