Changeset

6286:ef81c67e1ae7

mod_http_oauth2: Allow zero response types (e.g. with the password grant)
author Kim Alvefur <zash@zash.se>
date Tue, 03 Jun 2025 16:59:07 +0200
parents 6285:b460b2a65f0b
children 6287:5b269511ade7
files mod_http_oauth2/mod_http_oauth2.lua
diffstat 1 files changed, 0 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mod_http_oauth2/mod_http_oauth2.lua	Tue Jun 03 01:11:37 2025 +0200
+++ b/mod_http_oauth2/mod_http_oauth2.lua	Tue Jun 03 16:59:07 2025 +0200
@@ -1298,7 +1298,6 @@
 		response_types = {
 			title = "Response Types";
 			type = "array";
-			minItems = 1;
 			uniqueItems = true;
 			items = { type = "string"; enum = { "code"; "token" } };
 			default = { "code" };
@@ -1470,8 +1469,6 @@
 
 	if set.intersection(grant_types, allowed_grant_type_handlers):empty() then
 		return nil, oauth_error("invalid_client_metadata", "No allowed 'grant_types' specified");
-	elseif set.intersection(response_types, allowed_response_type_handlers):empty() then
-		return nil, oauth_error("invalid_client_metadata", "No allowed 'response_types' specified");
 	end
 
 	if client_metadata.token_endpoint_auth_method ~= "none" then