From 9a8c0de47917c9a10e8dd400d19c5c7286fd1cd2 Mon Sep 17 00:00:00 2001 From: haoliu Date: Tue, 26 Feb 2019 11:10:00 +0800 Subject: [PATCH] [TMA-630][haoliu & llr] Using default blank in oidc_label when failed. --- kong/plugins/okta-auth/access.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kong/plugins/okta-auth/access.lua b/kong/plugins/okta-auth/access.lua index 39e4501..a5ddf20 100644 --- a/kong/plugins/okta-auth/access.lua +++ b/kong/plugins/okta-auth/access.lua @@ -35,12 +35,13 @@ local function make_oidc(token_data) local oidc_label = okta_api.get_oidc_label(oidc["cid"]) if oidc_label then - ngx.log(ngx.DEBUG, " Get Oidc label Success.") - oidc["Lab"] = oidc_label + ngx.log(ngx.DEBUG, " Get Oidc label Success. oidc_label: ", oidc_label) else ngx.log(ngx.ERR, " Get Oidc label failed.") + oidc_label = '' end + oidc["Lab"] = oidc_label return oidc end