Software /
code /
prosody-modules
Diff
mod_http_oauth2/mod_http_oauth2.lua @ 5225:3439eb37f23b
mod_http_oauth2: token endpoint: handle missing credentials
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 07 Mar 2023 15:33:07 +0000 |
parent | 5224:cd5cf4cc6304 |
child | 5228:77cd01af06a9 |
line wrap: on
line diff
--- a/mod_http_oauth2/mod_http_oauth2.lua Tue Mar 07 15:31:19 2023 +0000 +++ b/mod_http_oauth2/mod_http_oauth2.lua Tue Mar 07 15:33:07 2023 +0000 @@ -466,7 +466,7 @@ return error_response(event.request, oauth_error("invalid_request")); end - if credentials.type == "basic" then + if credentials and credentials.type == "basic" then params.client_id = http.urldecode(credentials.username); params.client_secret = http.urldecode(credentials.password); end