This is an automated email from the ASF dual-hosted git repository.
membphis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git
The following commit(s) were added to refs/heads/master by this push:
new eebaaf7 chore: Fix Authorization header name in auth-keycloak plugin.
(#2913)
eebaaf7 is described below
commit eebaaf751251b93e0d00a2bc65e0cffadc7e4977
Author: Jens Keiner <[email protected]>
AuthorDate: Wed Dec 2 00:41:29 2020 +0100
chore: Fix Authorization header name in auth-keycloak plugin. (#2913)
The `auth-keycloak` plugin expects to find a bearer token in the standard
`Authorization` header. However, it tries to obtain a token from a header
called `authorization`, i.e. not properly capitalized. This PR fixes the
capitalization so the correct header is used; cf.
https://en.wikipedia.org/wiki/List_of_HTTP_header_fields.
---
apisix/plugins/authz-keycloak.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apisix/plugins/authz-keycloak.lua
b/apisix/plugins/authz-keycloak.lua
index e634313..ff0eda0 100644
--- a/apisix/plugins/authz-keycloak.lua
+++ b/apisix/plugins/authz-keycloak.lua
@@ -135,7 +135,7 @@ end
local function fetch_jwt_token(ctx)
- local token = core.request.header(ctx, "authorization")
+ local token = core.request.header(ctx, "Authorization")
if not token then
return nil, "authorization header not available"
end