nokia / kong-oidc

OIDC plugin for Kong
Apache License 2.0
455 stars 320 forks source link

Possibility of adding custom query params for the introspection request #178

Open moxue1989 opened 3 years ago

moxue1989 commented 3 years ago

I have to first say that I am loving this plugin, it made integrating with Keycloak for authentication much easier.

I have a use case where I would like to perform token introspection with a id_token or another custom token name instead of the access_token. But the identity management service I am using (Keycloak) requires that I provide a query param of token_type_hint for the introspection request or else it will default to using access_token. I haven't found an easy way of adding this in with the existing functionality.

Would it be possible to add a configurable map of query params to include as part of the introspection request? Or if there is another way of achieving the same result that would be helpful too!

Thanks!

moxue1989 commented 3 years ago

Looks like the library that you are using https://github.com/zmartzone/lua-resty-openidc/blob/master/lib/resty/openidc.lua accepts a introspection_params as part of the options for making the OIDC request. Maybe this can be added and just passed through the schema