Software /
code /
prosody-modules
Changeset
6322:dfc035ecabb4
mod_http_oauth2: Remove defaults that should be included on clients
Since create_client() adds these fields if they are missing, we can
assume that they are present.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 03 Jul 2025 12:32:43 +0200 |
parents | 6321:e174e12549e1 |
children | 6323:4f9b42c53d0f |
files | mod_http_oauth2/mod_http_oauth2.lua |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_http_oauth2/mod_http_oauth2.lua Thu Jul 03 12:27:32 2025 +0200 +++ b/mod_http_oauth2/mod_http_oauth2.lua Thu Jul 03 12:32:43 2025 +0200 @@ -913,7 +913,7 @@ local grant_type = params.grant_type - if not array_contains(client.grant_types or { "authorization_code" }, grant_type) then + if not array_contains(client.grant_types, grant_type) then return oauth_error("invalid_request", "'grant_type' not registered"); end @@ -954,7 +954,7 @@ -- From this point we know that redirect_uri is safe to use local response_type = params.response_type; - if not array_contains(client.response_types or { "code" }, response_type) then + if not array_contains(client.response_types, response_type) then return error_response(request, redirect_uri, oauth_error("invalid_client", "'response_type' not registered")); end if not allowed_response_type_handlers:contains(response_type) then