Comparison

mod_http_oauth2/mod_http_oauth2.lua @ 5359:230fc6a0c086

mod_http_oauth2: Use new Lua pattern schema properties
author Kim Alvefur <zash@zash.se>
date Sat, 22 Apr 2023 16:29:56 +0200
parent 5358:0905d348bd34
child 5364:0444953e3247
comparison
equal deleted inserted replaced
5358:0905d348bd34 5359:230fc6a0c086
656 }; 656 };
657 }; 657 };
658 }; 658 };
659 response_types = { type = "array"; items = { type = "string"; enum = { "code"; "token" } } }; 659 response_types = { type = "array"; items = { type = "string"; enum = { "code"; "token" } } };
660 client_name = { type = "string" }; 660 client_name = { type = "string" };
661 client_uri = { type = "string"; format = "uri"; pattern = "^https:" }; 661 client_uri = { type = "string"; format = "uri"; luaPattern = "^https:" };
662 logo_uri = { type = "string"; format = "uri"; pattern = "^https:" }; 662 logo_uri = { type = "string"; format = "uri"; luaPattern = "^https:" };
663 scope = { type = "string" }; 663 scope = { type = "string" };
664 contacts = { type = "array"; items = { type = "string" } }; 664 contacts = { type = "array"; items = { type = "string" } };
665 tos_uri = { type = "string"; format = "uri"; pattern = "^https:" }; 665 tos_uri = { type = "string"; format = "uri"; luaPattern = "^https:" };
666 policy_uri = { type = "string"; format = "uri"; pattern = "^https:" }; 666 policy_uri = { type = "string"; format = "uri"; luaPattern = "^https:" };
667 jwks_uri = { type = "string"; format = "uri"; pattern = "^https:" }; 667 jwks_uri = { type = "string"; format = "uri"; luaPattern = "^https:" };
668 jwks = { type = "object"; description = "JSON Web Key Set, RFC 7517" }; 668 jwks = { type = "object"; description = "JSON Web Key Set, RFC 7517" };
669 software_id = { type = "string"; format = "uuid" }; 669 software_id = { type = "string"; format = "uuid" };
670 software_version = { type = "string" }; 670 software_version = { type = "string" };
671 }; 671 };
672 -- Localized versions of descriptive properties and URIs 672 -- Localized versions of descriptive properties and URIs
673 patternProperties = { ["^[a-z_]+_uri#"] = { type = "string"; format = "uri"; pattern = "^https:" } }; 673 luaPatternProperties = { ["^[a-z_]+_uri#"] = { type = "string"; format = "uri"; luaPattern = "^https:" } };
674 additionalProperties = { type = "string" }; 674 additionalProperties = { type = "string" };
675 } 675 }
676 676
677 function create_client(client_metadata) 677 function create_client(client_metadata)
678 if not schema.validate(registration_schema, client_metadata) then 678 if not schema.validate(registration_schema, client_metadata) then