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 2020/01/06 09:30:04 UTC

[GitHub] [incubator-apisix] lilien1010 commented on a change in pull request #1027: Jwt authentication plugin compatible with Bearer prefix

lilien1010 commented on a change in pull request #1027: Jwt authentication plugin compatible with Bearer prefix
URL: https://github.com/apache/incubator-apisix/pull/1027#discussion_r363215859
 
 

 ##########
 File path: lua/apisix/plugins/jwt-auth.lua
 ##########
 @@ -90,16 +91,19 @@ end
 
 
 local function fetch_jwt_token()
-    local args = ngx.req.get_uri_args()
-    if args and args.jwt then
-        return args.jwt
-    end
-
     local headers = ngx.req.get_headers()
     if headers.Authorization then
+        if sub_str(headers.Authorization,1,7) == 'Bearer ' then
 
 Review comment:
   sure , I think it's better handle `bearer `

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services