Token introspection helps to validate a request by verifying the token against an Oauth 2 authorization server. As prerequisite, you should create a trusted client in the identity server and generate a valid token(JWT) for introspection. The following image shows an example(successful) flow of the token introspection via the gateway.
The following is the curl command to enable the plugin to an external service. This route will protect https://httpbin.org/get
(echo service) by introspecting the token provided in the header of the request.
Introspecting with public key
You can also provide the public key of the JWT token to verify the token. In case if you have provided a public key and a token introspection endpoint, the public key workflow will be executed instead of verifying with the identity server. This method can be used if you want to reduce additional network calls and to speedup the process.
Check/modify the DNS settings (`conf/config.yaml) if APISIX cannot resolve/connect to the identity provider.