Changeset

5398:38da5ca498dd

mod_http_oauth2: Advertise supported grant types Seems redundant, since it's just the response types with other labels.
author Kim Alvefur <zash@zash.se>
date Tue, 02 May 2023 16:07:09 +0200
parents 5397:18b57e91b5e5
children 5399:89c9e9bba60d
files mod_http_oauth2/mod_http_oauth2.lua
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mod_http_oauth2/mod_http_oauth2.lua	Tue May 02 15:41:36 2023 +0200
+++ b/mod_http_oauth2/mod_http_oauth2.lua	Tue May 02 16:07:09 2023 +0200
@@ -956,6 +956,13 @@
 				revocation_endpoint = handle_revocation_request and module:http_url() .. "/revoke" or nil;
 				revocation_endpoint_auth_methods_supported = array({ "client_secret_basic" });
 				code_challenge_methods_supported = array(it.keys(verifier_transforms));
+				grant_types_supported = array(it.keys(response_type_handlers)):map(function(h)
+					if h == "token" then
+						return "implicit"
+					elseif h == "code" then
+						return "authorization_code"
+					end
+				end);
 				authorization_response_iss_parameter_supported = true;
 
 				-- OpenID