# HG changeset patch # User Kim Alvefur # Date 1687018500 -7200 # Node ID 67152838afbc81a12c3c5cf99192a34cc98c5100 # Parent 12828e969a60fba6eed6b3c5e57b6d620bed19ec mod_http_oauth2: Improve error messages for URI properties Since there are separate validation checks for URI properties, including that they should use https, with better and more specific error reporting. Reverts 'luaPattern' to 'pattern' which is not currently supported by util.jsonschema, but allows anything that retrieves the schema over http to validate against it, should they wish to do so. diff -r 12828e969a60 -r 67152838afbc mod_http_oauth2/mod_http_oauth2.lua --- a/mod_http_oauth2/mod_http_oauth2.lua Sat Jun 17 16:28:13 2023 +0200 +++ b/mod_http_oauth2/mod_http_oauth2.lua Sat Jun 17 18:15:00 2023 +0200 @@ -925,13 +925,13 @@ default = { "code" }; }; client_name = { type = "string" }; - client_uri = { type = "string"; format = "uri"; luaPattern = "^https:" }; - logo_uri = { type = "string"; format = "uri"; luaPattern = "^https:" }; + client_uri = { type = "string"; format = "uri"; pattern = "^https:" }; + logo_uri = { type = "string"; format = "uri"; pattern = "^https:" }; scope = { type = "string" }; contacts = { type = "array"; minItems = 1; items = { type = "string"; format = "email" } }; - tos_uri = { type = "string"; format = "uri"; luaPattern = "^https:" }; - policy_uri = { type = "string"; format = "uri"; luaPattern = "^https:" }; - jwks_uri = { type = "string"; format = "uri"; luaPattern = "^https:" }; + tos_uri = { type = "string"; format = "uri"; pattern = "^https:" }; + policy_uri = { type = "string"; format = "uri"; pattern = "^https:" }; + jwks_uri = { type = "string"; format = "uri"; pattern = "^https:" }; jwks = { type = "object"; description = "JSON Web Key Set, RFC 7517" }; software_id = { type = "string"; format = "uuid" }; software_version = { type = "string" }; @@ -939,7 +939,7 @@ 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:" }; + ["^[a-z_]+_uri#"] = { type = "string"; format = "uri" }; }; }