nokia / kong-oidc

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

Add JWKS-based validation support #150

Open jmdacruz opened 4 years ago

jmdacruz commented 4 years ago

Looking at the introspection code in handler.lua, it seems that the code uses the instrospect function in resty.openidc. This function relies on the token introspection endpoint, even when the provider may also support JWKS allowing local validation of tokens (no need to call the token introspection endpoint). It seems this could be achieved by using the bearer_jwt_verify function in resty.openidc, which has a similar API to the introspect function.

Should there be a configuration option on the plugin to allow users to switch to bearer_jwt_verify?

(This seems to be related to #106)