Skip to content

Commit 5023588

Browse files
authored
Merge pull request #208 from vishnu2kmohan/master
url-encode the Client ID for the Windows Integrated Authentication (WIA) case
2 parents a12ed37 + 7cddbbc commit 5023588

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/resty/openidc.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,11 +391,11 @@ function openidc.call_token_endpoint(opts, endpoint, body, auth, endpoint_name)
391391
if auth then
392392
if auth == "client_secret_basic" then
393393
if opts.client_secret then
394-
headers.Authorization = "Basic " .. b64(ngx.escape_uri(opts.client_id) .. ":" .. ngx.escape_uri(opts.client_secret))
394+
headers.Authorization = "Basic " .. b64(ngx.escape_uri(opts.client_id) .. ":" .. ngx.escape_uri(opts.client_secret))
395395
else
396396
-- client_secret must not be set if Windows Integrated Authentication (WIA) is used with
397397
-- Active Directory Federation Services (AD FS) 4.0 (or newer) on Windows Server 2016 (or newer)
398-
headers.Authorization = "Basic " .. b64(opts.client_id .. ":")
398+
headers.Authorization = "Basic " .. b64(ngx.escape_uri(opts.client_id) .. ":")
399399
end
400400
log(DEBUG, "client_secret_basic: authorization header '" .. headers.Authorization .. "'")
401401
end

0 commit comments

Comments
 (0)