Changeset

5393:9b9d612f9083

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.
author Kim Alvefur <zash@zash.se>
date Sun, 30 Apr 2023 16:58:53 +0200
parents 5392:c0a6f39caf47
children 5394:434ee49b04de
files mod_http_oauth2/mod_http_oauth2.lua
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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) };
 	};
 });