-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
chore: streamline error checking process #6103
Conversation
6207cd0
to
105fabf
Compare
apisix/plugins/openid-connect.lua
Outdated
@@ -293,30 +293,28 @@ function _M.rewrite(plugin_conf, ctx) | |||
-- the configured redirect URI after successful authentication. | |||
response, err = openidc.authenticate(conf) | |||
|
|||
if err then | |||
if not response then |
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.
the openidc returns non-nil err to indicate something wrong, see:
https://github.com/zmartzone/lua-resty-openidc#sample-configuration-for-google-signin
https://github.com/zmartzone/lua-resty-openidc/blob/master/lib/resty/openidc.lua#L1494
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.
Thanks. Updated
t/plugin/basic-auth.t
Outdated
@@ -398,7 +398,7 @@ GET /t | |||
|
|||
|
|||
|
|||
=== TEST 15: enable basic auth plugin using admin api, set hide_credentials = true | |||
=== TEST 18: enable basic auth plugin using admin api, set hide_credentials = true |
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.
Need to fetch the latest code for the master branch, which has been fixed.
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.
Done. Thanks
Signed-off-by: Bisakh Mondal <bisakhmondal00@gmail.com>
105fabf
to
a930d3e
Compare
Signed-off-by: Bisakh Mondal bisakhmondal00@gmail.com
What this PR does / why we need it:
#6037 (comment)
Pre-submission checklist: