Skip to content

Commit

Permalink
bugfix: Fix for remote open ID connect introspection (apache#1743)
Browse files Browse the repository at this point in the history
  • Loading branch information
sshniro authored and SaberMaster committed Jun 30, 2020
1 parent 29fb3ff commit a4d23f8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apisix/plugins/openid-connect.lua
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,12 @@ local function introspect(ctx, conf)
end
else
res, err = openidc.introspect(conf)
if res then
if err then
return ngx.HTTP_UNAUTHORIZED, err
else
return res
end
end

if conf.bearer_only then
ngx.header["WWW-Authenticate"] = 'Bearer realm="' .. conf.realm
.. '",error="' .. err .. '"'
Expand Down

0 comments on commit a4d23f8

Please sign in to comment.