# HG changeset patch # User Kim Alvefur # Date 1684409058 -7200 # Node ID d4d333cb75b27fcdb076512a74c7cdf9475a5417 # Parent 40c9901590063e8da718c5106b1faeb523ac0b93 mod_http_oauth2: Clarify some error messages diff -r 40c990159006 -r d4d333cb75b2 mod_http_oauth2/mod_http_oauth2.lua --- a/mod_http_oauth2/mod_http_oauth2.lua Thu May 18 13:19:25 2023 +0200 +++ b/mod_http_oauth2/mod_http_oauth2.lua Thu May 18 13:24:18 2023 +0200 @@ -688,18 +688,20 @@ return error_response(request, oauth_error("invalid_request", "Invalid query parameters")); end - if not params.client_id then return oauth_error("invalid_request", "missing 'client_id'"); end + if not params.client_id then + return oauth_error("invalid_request", "Missing 'client_id' parameter"); + end local ok, client = verify_client(params.client_id); if not ok then - return oauth_error("invalid_client", "incorrect credentials"); + return oauth_error("invalid_request", "Invalid 'client_id' parameter"); end local client_response_types = set.new(array(client.response_types or { "code" })); client_response_types = set.intersection(client_response_types, allowed_response_type_handlers); if not client_response_types:contains(params.response_type) then - return oauth_error("invalid_client", "response_type not allowed"); + return oauth_error("invalid_client", "'response_type' not allowed"); end local requested_scopes = parse_scopes(params.scope or "");