comparison mod_http_oauth2/mod_http_oauth2.lua @ 5245:e22cae58141d

mod_http_oauth2: Organize HTTP routes with comments Starting to get hard to follow. Usually one would start tracing the steps at the HTTP authorize route. Vaguely sorted alphabetically by path and point in the flow. (/register comes before /authorize tho)
author Kim Alvefur <zash@zash.se>
date Sun, 12 Mar 2023 11:27:29 +0100
parents fa7bd721a3f6
children fd0d25b42cd9
comparison
equal deleted inserted replaced
5244:fa7bd721a3f6 5245:e22cae58141d
682 end 682 end
683 683
684 module:depends("http"); 684 module:depends("http");
685 module:provides("http", { 685 module:provides("http", {
686 route = { 686 route = {
687 ["POST /token"] = handle_token_grant; 687 -- User-facing login and consent view
688 ["GET /authorize"] = handle_authorization_request; 688 ["GET /authorize"] = handle_authorization_request;
689 ["POST /authorize"] = handle_authorization_request; 689 ["POST /authorize"] = handle_authorization_request;
690
691 -- Create OAuth client
692 ["POST /register"] = handle_register_request;
693
694 ["POST /token"] = handle_token_grant;
690 ["POST /revoke"] = handle_revocation_request; 695 ["POST /revoke"] = handle_revocation_request;
691 ["POST /register"] = handle_register_request; 696
697 -- OpenID
692 ["GET /userinfo"] = handle_userinfo_request; 698 ["GET /userinfo"] = handle_userinfo_request;
693 699
694 -- Optional static content for templates 700 -- Optional static content for templates
695 ["GET /style.css"] = templates.css and { 701 ["GET /style.css"] = templates.css and {
696 headers = { 702 headers = {