Skip to content

Commit d2fcee2

Browse files
committed
feat: add return_unauthorized_default parameter to get_params function
1 parent dfa0c1c commit d2fcee2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/resty/libjwt/utils.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ function _M.get_params(params)
44
local result = {
55
header_token = "Authorization",
66
jwks_files = {},
7+
return_unauthorized_default = true
78
}
89
if params == nil then
910
return nil, "params is required"
@@ -15,6 +16,9 @@ function _M.get_params(params)
1516
if params["jwks_files"] == nil then
1617
return nil, "jwks_files is required"
1718
end
19+
if params["return_unauthorized_default"] ~= nil then
20+
result.return_unauthorized_default = params["return_unauthorized_default"]
21+
end
1822
if type(params["jwks_files"]) ~= "table" then
1923
return nil, "jwks_files is not an array"
2024
end

0 commit comments

Comments
 (0)