Software /
code /
prosody-modules
Changeset
5553:67152838afbc
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.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 17 Jun 2023 18:15:00 +0200 |
parents | 5552:12828e969a60 |
children | 5554:90449babaa48 |
files | mod_http_oauth2/mod_http_oauth2.lua |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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" }; }; }