New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add hide_credentials for multi-auth plugin #11152
Conversation
73d0293
to
7460aef
Compare
Hi I don't understand this feature well. Could you please describe this in more detail in the linked issue? |
multi-auth plugin works as a wrapper to enable multiple authentication for routes. but I found there is a bug where users can't use a common header name for multiple authentication with credential hiding option. which we need fixed, most of the cases users need to hide their credentials. I fixed that with this pull request. this fix will allow users to use a common header to use multiple authentication with credential hiding. |
does this bug exist only in |
most of the auth plugins use http headers, few use query params and cookies, jwt-auth and key-auth are some of them. In this fix we clear the auth-details after iterating thru all the auth plugins. Therefore I moved a generic code snippet where it clears the cookies to utils, to avoid code redundency. |
please cover them with test cases. Thank you. |
7e82c7a
to
7bdaa1d
Compare
@madhawa-gunasekara please avoid force pushing and resolve the lint failure thanks. |
|
||
local _M = {} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only two blanklines are needed
|
||
return table_concat(t, "; ") | ||
end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one more blank line needed
bab158f
to
9c1f20c
Compare
Fixes #11069 11069
Checklist