You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/03/02 09:27:32 UTC
[GitHub] [apisix] guoqqqi commented on a change in pull request #6485: feat: authz-keycloak plugin support redirect
guoqqqi commented on a change in pull request #6485:
URL: https://github.com/apache/apisix/pull/6485#discussion_r817501466
##########
File path: apisix/plugins/authz-keycloak.lua
##########
@@ -592,9 +593,13 @@ local function evaluate_permissions(conf, ctx, token)
permission = conf.permissions
end
- -- Return 403 if permission is empty and enforcement mode is "ENFORCING".
+ -- Return 403 or 302 if permission is empty and enforcement mode is "ENFORCING".
if #permission == 0 and conf.policy_enforcement_mode == "ENFORCING" then
-- Return Keycloak-style message for consistency.
+ if conf.access_denied_redirect_uri then
+ core.response.set_header("Location", conf.access_denied_redirect_uri)
Review comment:
```suggestion
if conf.access_denied_redirect_uri then
core.response.set_header("Location", conf.access_denied_redirect_uri)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org