Mercurial > prosody-modules
diff 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 |
line wrap: on
line diff
--- 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