You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the Authorization header is found but its value does not contain a space (because the caller forgot to add 'Bearer ' at the start), then openid returns the error message "no Authorization header found".
This is misleading when troubleshooting as the cause of the error is not the Authorization header that is not present but its value that is incorrect.
if header == nil or header:find(" ") == nil then
err = "no Authorization header found"
log(DEBUG, err)
return nil, err
end
--> header:find(" ") == nil is the problem here.
Environment
lua-resty-openidc 1.7.5
Expected behaviour
A more appropriate error should be returned (like "no Bearer authorization header value found") :)
Actual behaviour
"no Authorization header found" error is returned
The text was updated successfully, but these errors were encountered:
When the Authorization header is found but its value does not contain a space (because the caller forgot to add 'Bearer ' at the start), then openid returns the error message "no Authorization header found".
This is misleading when troubleshooting as the cause of the error is not the Authorization header that is not present but its value that is incorrect.
--> header:find(" ") == nil is the problem here.
Environment
Expected behaviour
A more appropriate error should be returned (like "no Bearer authorization header value found") :)
Actual behaviour
"no Authorization header found" error is returned
The text was updated successfully, but these errors were encountered: