# HG changeset patch # User Kim Alvefur # Date 1677961475 -3600 # Node ID c60cff787d6a80b6ca27706003b1515efae4fc8a # Parent b81fd0d22c66b9c7f2808f2234468f29c4acbe0f mod_http_oauth2: Return actually enabled response types in discovery diff -r b81fd0d22c66 -r c60cff787d6a mod_http_oauth2/mod_http_oauth2.lua --- a/mod_http_oauth2/mod_http_oauth2.lua Sat Mar 04 17:06:47 2023 +0100 +++ b/mod_http_oauth2/mod_http_oauth2.lua Sat Mar 04 21:24:35 2023 +0100 @@ -11,6 +11,8 @@ local base64 = encodings.base64; local schema = require "util.jsonschema"; local jwt = require"util.jwt"; +local it = require "util.iterators"; +local array = require "util.array"; local tokens = module:depends("tokenauth"); @@ -477,7 +479,7 @@ jwks_uri = nil; -- TODO? registration_endpoint = handle_register_request and module:http_url() .. "/register" or nil; scopes_supported = { "prosody:restricted"; "prosody:user"; "prosody:admin"; "prosody:operator" }; - response_types_supported = { "code"; "token" }; -- TODO derive from active config + response_types_supported = array(it.keys(response_type_handlers)); authorization_response_iss_parameter_supported = true; }; };