How to make an '/oauth2/token' route apply to multiple service's oauth2 plugin, client credentials mode

I created two service in Kong.And I want to issue a token for each consumer, but this token is only valid for one service.So I have followed the steps as described in the documentation to create ‘/oauth2/token’ for each service.

‘/service1/oauth2/token’
‘/service2/oauth2/token’

Now, I want to be able to get the token through a unified ‘/oauth2/token’ interface.
How can I achieve it?

Thanks!

Did you try :8001/oauth2_tokens?

8001 is the port on which Kong’s Admin API is running.

No, I try to use ‘https://xxx.org:8443/service1/oauth2/token’ and ‘https://xxx.org:8443/service2/oauth2/token’ get token, it’s works for me.
But I hope use an ‘https://xxx.org:8443/oauth2/token’ to get the token, instead of creating a route for each service.


© 2019 Kong Inc.    Terms  •  Privacy  •  FAQ