Changeset

5236:ff8623e2f9d9

mod_http_oauth2: Reorder client metadata validation schema Having 'type' first seems right
author Kim Alvefur <zash@zash.se>
date Sat, 11 Mar 2023 21:11:50 +0100
parents 5235:d0d251abf595
children 5237:3354f943c1fa
files mod_http_oauth2/mod_http_oauth2.lua
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mod_http_oauth2/mod_http_oauth2.lua	Sat Mar 11 18:41:49 2023 +0000
+++ b/mod_http_oauth2/mod_http_oauth2.lua	Sat Mar 11 21:11:50 2023 +0100
@@ -555,9 +555,11 @@
 	required = { "client_name"; "redirect_uris" };
 	properties = {
 		redirect_uris = { type = "array"; minLength = 1; items = { type = "string"; format = "uri" } };
-		token_endpoint_auth_method = { enum = { "none"; "client_secret_post"; "client_secret_basic" }; type = "string" };
+		token_endpoint_auth_method = { type = "string"; enum = { "none"; "client_secret_post"; "client_secret_basic" } };
 		grant_types = {
+			type = "array";
 			items = {
+				type = "string";
 				enum = {
 					"authorization_code";
 					"implicit";
@@ -567,16 +569,14 @@
 					"urn:ietf:params:oauth:grant-type:jwt-bearer";
 					"urn:ietf:params:oauth:grant-type:saml2-bearer";
 				};
-				type = "string";
 			};
-			type = "array";
 		};
-		response_types = { items = { enum = { "code"; "token" }; type = "string" }; type = "array" };
+		response_types = { type = "array"; items = { type = "string"; enum = { "code"; "token" } } };
 		client_name = { type = "string" };
 		client_uri = { type = "string"; format = "uri" };
 		logo_uri = { type = "string"; format = "uri" };
 		scope = { type = "string" };
-		contacts = { items = { type = "string" }; type = "array" };
+		contacts = { type = "array"; items = { type = "string" } };
 		tos_uri = { type = "string" };
 		policy_uri = { type = "string"; format = "uri" };
 		jwks_uri = { type = "string"; format = "uri" };