Current Behavior
When set use_jwks: true, the plugin not set userinfo into headers
|
local res, err = openidc.bearer_jwt_verify(conf) |
|
|
|
if err then |
|
-- Error while validating or token invalid. |
|
ngx.header["WWW-Authenticate"] = 'Bearer realm="' .. conf.realm .. |
|
'", error="invalid_token", error_description="' .. err .. '"' |
|
return ngx.HTTP_UNAUTHORIZED, err, nil, nil |
|
end |
|
|
|
-- Token successfully validated. |
|
local method = (conf.public_key and "public_key") or (conf.use_jwks and "jwks") |
|
core.log.debug("token validate successfully by ", method) |
|
return res, err, token, nil |
maybe line 240 should be return res, err, token, res ?
Expected Behavior
userinfo set into headers as x-userinfo
Error Logs
No response
Steps to Reproduce
configs:
routes:
- uri:
plugins:
openid-connect:
# https://github.com/apache/apisix/issues/5425
client_id: xxx
client_secret: xxx
discovery: some_host/oidc/.well-known/openid-configuration
use_jwks: true
bearer_only: true
access_token_in_authorization_header: true
set_userinfo_header: true
Environment
- APISIX version (docker: 2.15.0-alpine):
Current Behavior
When set
use_jwks: true, the plugin not set userinfo into headersapisix/apisix/plugins/openid-connect.lua
Lines 228 to 240 in 23356d6
maybe line 240 should be
return res, err, token, res?Expected Behavior
userinfo set into headers as x-userinfo
Error Logs
No response
Steps to Reproduce
configs:
Environment