Skip to content

Commit a12ed37

Browse files
committed
make call_userinfo_endpoint a public function; closes #207
thanks @thomasleplus; also following call_token_endpoint Signed-off-by: Hans Zandbelt <hans.zandbelt@zmartzone.eu>
1 parent bd3de58 commit a12ed37

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
10/11/2018
22
- url-encode client_id/client_secret; closes #204 and #205; thanks @grrolland
33
https://tools.ietf.org/html/rfc6749#section-2.3.1
4+
- make call_userinfo_endpoint a public function; closes #207; thanks @thomasleplus
45

56
10/8/2018
67
- make call_token_endpoint a public function

lib/resty/openidc.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ function openidc.call_token_endpoint(opts, endpoint, body, auth, endpoint_name)
445445
end
446446

447447
-- make a call to the userinfo endpoint
448-
local function openidc_call_userinfo_endpoint(opts, access_token)
448+
function openidc.call_userinfo_endpoint(opts, access_token)
449449
if not opts.discovery.userinfo_endpoint then
450450
log(DEBUG, "no userinfo endpoint supplied")
451451
return nil, nil
@@ -1050,7 +1050,7 @@ local function openidc_authorization_response(opts, session)
10501050
-- call the user info endpoint
10511051
-- TODO: should this error be checked?
10521052
local user
1053-
user, err = openidc_call_userinfo_endpoint(opts, json.access_token)
1053+
user, err = openidc.call_userinfo_endpoint(opts, json.access_token)
10541054

10551055
if err then
10561056
log(ERROR, "error calling userinfo endpoint: " .. err)

0 commit comments

Comments
 (0)