-
Notifications
You must be signed in to change notification settings - Fork 361
Bearer only client #27
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
Conversation
@lodrantl, could you rebase the PR from the current master? There was a problem with CI, which is fixed now. |
Pull Request Test Coverage Report for Build 63
💛 - Coveralls |
Finnally took the time to rebase and add the tests. Also deployed it to staging env and we'll see how it goes. |
Looks good. @phirvone could you also look at this. |
kong/plugins/oidc/handler.lua
Outdated
local res, err = require("resty.openidc").introspect(oidcConfig) | ||
if err then | ||
if oidcConfig.bearer_only == "yes" then | ||
ngx.header["WWW-Authenticate"] = 'Bearer realm="kong",error="' .. err .. '"' |
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.
Should realm here be hardcoded? IDP can have different realms and I think it should be also a configuration option.
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.
Also thought about that, but didn't want to overcomplicate the configuration. But now that I think again, I am all for a configurable realm with a sane default.
oidcConfig.bearer_only always resolved to true. Changed for oidcConfig.bearer_only == "yes".
Resolves #26.