# HG changeset patch # User Kim Alvefur # Date 1678616849 -3600 # Node ID e22cae58141db095aaaffaa55c916f34829b0d36 # Parent fa7bd721a3f66759b43c31d580184e16261f148e 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) diff -r fa7bd721a3f6 -r e22cae58141d mod_http_oauth2/mod_http_oauth2.lua --- a/mod_http_oauth2/mod_http_oauth2.lua Sat Mar 11 22:58:47 2023 +0100 +++ b/mod_http_oauth2/mod_http_oauth2.lua Sun Mar 12 11:27:29 2023 +0100 @@ -684,11 +684,17 @@ module:depends("http"); module:provides("http", { route = { - ["POST /token"] = handle_token_grant; + -- User-facing login and consent view ["GET /authorize"] = handle_authorization_request; ["POST /authorize"] = handle_authorization_request; + + -- Create OAuth client + ["POST /register"] = handle_register_request; + + ["POST /token"] = handle_token_grant; ["POST /revoke"] = handle_revocation_request; - ["POST /register"] = handle_register_request; + + -- OpenID ["GET /userinfo"] = handle_userinfo_request; -- Optional static content for templates