Skip to content

Commit

Permalink
[TMA-630][haoliu & llr] Using ngx.log instead of kong.log because kon…
Browse files Browse the repository at this point in the history
…g version is too low
  • Loading branch information
Nexuscream committed Feb 25, 2019
1 parent c66370e commit 5125662
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 494 deletions.
7 changes: 3 additions & 4 deletions kong/plugins/okta-auth/access.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
local okta_api = require "kong.plugins.okta-auth.okta_api"
local json = require "cjson"
local jwt = require "kong.plugins.okta-auth.jwt"
local logger = require 'kong.plugins.okta-auth.log'

local _M = {}

Expand Down Expand Up @@ -30,16 +29,16 @@ local function extract_data(token_data)
end

local function make_oidc(token_data)
logger.info("Make Oidc")
ngx.log(ngx.INFO, "Make Oidc")

local oidc = extract_data(token_data)
local oidc_label = okta_api.get_oidc_label(oidc.cid)

if oidc_label then
logger.debug(" Complete Oidc label Success.")
ngx.log(ngx.DEBUG, " Complete Oidc label Success.")
oidc['Lab'] = oidc_label
else
logger.err(" Complete Oidc label failed.")
ngx.log(ngx.ERR, " Complete Oidc label failed.")
end

return oidc
Expand Down
Loading

0 comments on commit 5125662

Please sign in to comment.