# HG changeset patch # User Kim Alvefur # Date 1678565510 -3600 # Node ID ff8623e2f9d99648634f4cc577fe4fbcf3f1de54 # Parent d0d251abf595cf25d982936f9033e9452652131e mod_http_oauth2: Reorder client metadata validation schema Having 'type' first seems right diff -r d0d251abf595 -r ff8623e2f9d9 mod_http_oauth2/mod_http_oauth2.lua --- 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" };