Skip to content

Commit

Permalink
make call_userinfo_endpoint a public function; closes #207
Browse files Browse the repository at this point in the history
thanks @thomasleplus; also following call_token_endpoint

Signed-off-by: Hans Zandbelt <hans.zandbelt@zmartzone.eu>
  • Loading branch information
zandbelt committed Oct 11, 2018
1 parent bd3de58 commit a12ed37
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
10/11/2018
- url-encode client_id/client_secret; closes #204 and #205; thanks @grrolland
https://tools.ietf.org/html/rfc6749#section-2.3.1
- make call_userinfo_endpoint a public function; closes #207; thanks @thomasleplus

10/8/2018
- make call_token_endpoint a public function
Expand Down
4 changes: 2 additions & 2 deletions lib/resty/openidc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ function openidc.call_token_endpoint(opts, endpoint, body, auth, endpoint_name)
end

-- make a call to the userinfo endpoint
local function openidc_call_userinfo_endpoint(opts, access_token)
function openidc.call_userinfo_endpoint(opts, access_token)
if not opts.discovery.userinfo_endpoint then
log(DEBUG, "no userinfo endpoint supplied")
return nil, nil
Expand Down Expand Up @@ -1050,7 +1050,7 @@ local function openidc_authorization_response(opts, session)
-- call the user info endpoint
-- TODO: should this error be checked?
local user
user, err = openidc_call_userinfo_endpoint(opts, json.access_token)
user, err = openidc.call_userinfo_endpoint(opts, json.access_token)

if err then
log(ERROR, "error calling userinfo endpoint: " .. err)
Expand Down

0 comments on commit a12ed37

Please sign in to comment.