Changeset

5365:698fef74ce53

mod_http_oauth2: Allow only l10n variants of name in client metadata Since "client_name" seems to be the only human readable non-URI property that makes sense to have localized version of. Therefore it seems excessive to allow arbitrary additionalProperties. We don't make use of localized versions of client_name and URIs yet, but it would be nice to do so.
author Kim Alvefur <zash@zash.se>
date Tue, 25 Apr 2023 17:38:36 +0200
parents 5364:0444953e3247
children 5366:db4c66a1d24b
files mod_http_oauth2/mod_http_oauth2.lua
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mod_http_oauth2/mod_http_oauth2.lua	Tue Apr 25 17:16:12 2023 +0200
+++ b/mod_http_oauth2/mod_http_oauth2.lua	Tue Apr 25 17:38:36 2023 +0200
@@ -669,9 +669,11 @@
 		software_id = { type = "string"; format = "uuid" };
 		software_version = { type = "string" };
 	};
-	-- Localized versions of descriptive properties and URIs
-	luaPatternProperties = { ["^[a-z_]+_uri#"] = { type = "string"; format = "uri"; luaPattern = "^https:" } };
-	additionalProperties = { type = "string" };
+	luaPatternProperties = {
+		-- Localized versions of descriptive properties and URIs
+		["^client_name#"] = { description = "Localized version of 'client_name'"; type = "string" };
+		["^[a-z_]+_uri#"] = { type = "string"; format = "uri"; luaPattern = "^https:" };
+	};
 }
 
 function create_client(client_metadata)