Skip to content

Commit

Permalink
[TMA-630][haoliu & llr] Get right response_body
Browse files Browse the repository at this point in the history
  • Loading branch information
Nexuscream committed Feb 26, 2019
1 parent 7caac2f commit c91a1d4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions kong/plugins/okta-auth/okta_api.lua
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,11 @@ local function fetch_objc_label(oidc_id)
for key, value in pairs(response_body) do
ngx.log(ngx.DEBUG, key, value)
end
return response_body.label
else
ngx.log(ngx.DEBUG, "Get Response Success response_body: ", response_body)
ngx.log(ngx.ERR, "Get Response Failed with wrong formatted")
return nil
end

local oidc = response_body[1] or response_body
return oidc.label
end

function _M.get_oidc_label(oidc_id)
Expand Down

0 comments on commit c91a1d4

Please sign in to comment.