You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by mh...@apache.org on 2017/07/19 18:15:43 UTC

[incubator-openwhisk-apigateway] branch master updated: lower case bearer (#252)

This is an automated email from the ASF dual-hosted git repository.

mhamann pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-apigateway.git


The following commit(s) were added to refs/heads/master by this push:
     new 28546b4  lower case bearer (#252)
28546b4 is described below

commit 28546b40ec1de46bc826ff88236791c0b2cdcf31
Author: Taylor King <ta...@gmail.com>
AuthorDate: Wed Jul 19 14:15:42 2017 -0400

    lower case bearer (#252)
---
 scripts/lua/policies/security/oauth2.lua | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/lua/policies/security/oauth2.lua b/scripts/lua/policies/security/oauth2.lua
index f54e719..21a8e81 100644
--- a/scripts/lua/policies/security/oauth2.lua
+++ b/scripts/lua/policies/security/oauth2.lua
@@ -39,7 +39,8 @@ function process(dataStore, securityObj)
     request.err(401, "No Authorization header provided")
     return nil
   end
-  accessToken = string.gsub(accessToken, '^Bearer%s', '')
+
+  accessToken = string.gsub(accessToken, '^[B|b][E|e][A|a][R|r][E|e][R|r]%s', '')
 
   local token = exchange(dataStore, accessToken, securityObj.provider, securityObj)
   if token == nil then

-- 
To stop receiving notification emails like this one, please contact
['"commits@openwhisk.apache.org" <co...@openwhisk.apache.org>'].