Skip to content

Commit

Permalink
fix plugins/oauth2
Browse files Browse the repository at this point in the history
  • Loading branch information
chronolaw committed Jan 13, 2024
1 parent 790f2bd commit a932133
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions kong/plugins/oauth2/access.lua
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,11 @@ local function parse_access_token(conf)

local access_token = kong.request.get_header(conf.auth_header_name)
if access_token then
local p = access_token:find(",", 1, true)
if p then
access_token = access_token:sub(1, p - 1)
end

local parts = {}
for v in access_token:gmatch("%S+") do -- Split by space
table.insert(parts, v)
Expand Down

0 comments on commit a932133

Please sign in to comment.