mod_http_oauth2: Add way to retrieve registration schema
authorKim Alvefur <zash@zash.se>
Sun, 30 Apr 2023 16:58:53 +0200
changeset 5397 9b9d612f9083
parent 5396 c0a6f39caf47
child 5398 434ee49b04de
mod_http_oauth2: Add way to retrieve registration schema Mostly for convenience and to fill the void otherwise and drive the awkward fallback to 404 away.
mod_http_oauth2/mod_http_oauth2.lua
--- a/mod_http_oauth2/mod_http_oauth2.lua	Sun Apr 30 16:42:04 2023 +0200
+++ b/mod_http_oauth2/mod_http_oauth2.lua	Sun Apr 30 16:58:53 2023 +0200
@@ -915,6 +915,9 @@
 			};
 			body = templates.js;
 		} or nil;
+
+		-- Some convenient fallback handlers
+		["GET /register"] = { headers = { content_type = "application/schema+json" }; body = json.encode(registration_schema) };
 	};
 });