Skip to content

Commit

Permalink
[TMA-630][haoliu & llr] Log for response_body
Browse files Browse the repository at this point in the history
  • Loading branch information
Nexuscream committed Feb 26, 2019
1 parent 9314e5c commit 31eca19
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion kong/plugins/okta-auth/handler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ local OktaAuth = BasePlugin:extend()
OktaAuth.PRIORITY = 1000

function OktaAuth:init_worker()
OktaAuth.super.new(self, "okta-auth")
OktaAuth.super.init_worker(self, "okta-auth")
--constant.load_env_when_nginx_worker_init()
end

Expand Down
7 changes: 7 additions & 0 deletions kong/plugins/okta-auth/okta_api.lua
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ local function fetch_objc_label(oidc_id)
return nil
end

ngx.log(ngx.DEBUG, "Get Response Success response_body: ", response_body)
if type(response_body) == "table" then
for key, value in pairs(response_body) do
printf(key, value)
end
end

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

0 comments on commit 31eca19

Please sign in to comment.