Software /
code /
prosody-modules
Changeset
6318:fe797da37174
mod_http_oauth2: Use cheaper array member check
This one does not create two new tables and then throw them away.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 02 Jul 2025 15:55:05 +0200 |
parents | 6317:8108aec64fb9 |
children | 6319:63ef69b2f046 |
files | mod_http_oauth2/mod_http_oauth2.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_http_oauth2/mod_http_oauth2.lua Wed Jul 02 15:53:02 2025 +0200 +++ b/mod_http_oauth2/mod_http_oauth2.lua Wed Jul 02 15:55:05 2025 +0200 @@ -1088,7 +1088,7 @@ return render_error(oauth_error("invalid_request", "Invalid 'client_id' parameter")); end - if not set.new(client.grant_types):contains(device_uri) then + if not array_contains(client.grant_types, device_uri) then return render_error(oauth_error("invalid_client", "Client not registered for device authorization grant")); end