Skip to content

Commit

Permalink
fix(openid-connect): allow use_jwks + auth header
Browse files Browse the repository at this point in the history
If you use jwks instead of explicitly setting the public key, requests
with a proper `Authorization: Bearer` header would still get the
`302 Found` response. Fix by adding `conf.use_jwks` to the check.
  • Loading branch information
jesse-r-s-hines committed Jan 2, 2024
1 parent c9529c8 commit cda684b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apisix/plugins/openid-connect.lua
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ function _M.rewrite(plugin_conf, ctx)

local response, err, session, _

if conf.bearer_only or conf.introspection_endpoint or conf.public_key then
if conf.bearer_only or conf.introspection_endpoint or conf.public_key or conf.use_jwks then
-- An introspection endpoint or a public key has been configured. Try to
-- validate the access token from the request, if it is present in a
-- request header. Otherwise, return a nil response. See below for
Expand Down

0 comments on commit cda684b

Please sign in to comment.