Software /
code /
prosody-modules
Comparison
mod_http_oauth2/mod_http_oauth2.lua @ 4237:a0ab7be0538d
mod_http_oauth2: Fix typo not caught by luacheck
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 09 Nov 2020 12:49:31 +0100 |
parent | 4228:3eb595cf847f |
child | 4256:c4b9d4ba839b |
comparison
equal
deleted
inserted
replaced
4236:c316ad1087d4 | 4237:a0ab7be0538d |
---|---|
30 | 30 |
31 function grant_type_handlers.password(params) | 31 function grant_type_handlers.password(params) |
32 local request_jid = assert(params.username, oauth_error("invalid_request", "missing 'username' (JID)")); | 32 local request_jid = assert(params.username, oauth_error("invalid_request", "missing 'username' (JID)")); |
33 local request_password = assert(params.password, oauth_error("invalid_request", "missing 'password'")); | 33 local request_password = assert(params.password, oauth_error("invalid_request", "missing 'password'")); |
34 local request_username, request_host, request_resource = jid.prepped_split(request_jid); | 34 local request_username, request_host, request_resource = jid.prepped_split(request_jid); |
35 if params.scope and param.scope ~= "" then | 35 if params.scope and params.scope ~= "" then |
36 return oauth_error("invalid_scope", "unknown scope requested"); | 36 return oauth_error("invalid_scope", "unknown scope requested"); |
37 end | 37 end |
38 if not (request_username and request_host) or request_host ~= module.host then | 38 if not (request_username and request_host) or request_host ~= module.host then |
39 return oauth_error("invalid_request", "invalid JID"); | 39 return oauth_error("invalid_request", "invalid JID"); |
40 end | 40 end |