comparison mod_http_oauth2/mod_http_oauth2.lua @ 3939:a6b3b41a116c

Merge commit
author tmolitor <thilo@eightysoft.de>
date Sun, 08 Mar 2020 19:59:49 +0100
parents 469408682152
children 3eb595cf847f
comparison
equal deleted inserted replaced
3938:3f4df08dce14 3939:a6b3b41a116c
65 return oauth_error("invalid_grant", "incorrect credentials"); 65 return oauth_error("invalid_grant", "incorrect credentials");
66 end 66 end
67 end 67 end
68 68
69 function handle_token_grant(event) 69 function handle_token_grant(event)
70 event.response.headers.content_type = "application/json";
70 local params = http.formdecode(event.request.body); 71 local params = http.formdecode(event.request.body);
71 if not params then 72 if not params then
72 return oauth_error("invalid_request"); 73 return oauth_error("invalid_request");
73 end 74 end
74 local grant_type = params.grant_type 75 local grant_type = params.grant_type