comparison mod_http_oauth2/mod_http_oauth2.lua @ 5247:dc27b997e969

mod_http_oauth2: Invoke mod_http_errors to render error on invalid redirect Turns out returning a table like that produces a blank page. Kinda boring and not very helpful.
author Kim Alvefur <zash@zash.se>
date Sun, 12 Mar 2023 17:56:23 +0100
parents fd0d25b42cd9
children b8b2bf0c1b4b
comparison
equal deleted inserted replaced
5246:fd0d25b42cd9 5247:dc27b997e969
207 message = "Here's your authorization code, copy and paste it into " .. (client.client_name or "your client"); 207 message = "Here's your authorization code, copy and paste it into " .. (client.client_name or "your client");
208 extra = code; 208 extra = code;
209 }) or ("Here's your authorization code:\n%s\n"):format(code); 209 }) or ("Here's your authorization code:\n%s\n"):format(code);
210 return response; 210 return response;
211 elseif not redirect_uri then 211 elseif not redirect_uri then
212 return {status_code = 400}; 212 return 400;
213 end 213 end
214 214
215 local redirect = url.parse(redirect_uri); 215 local redirect = url.parse(redirect_uri);
216 216
217 local query = http.formdecode(redirect.query or ""); 217 local query = http.formdecode(redirect.query or "");