mod_http_oauth2: Support granting zero role-scopes
It seems Very Bad that if you uncheck all roles on the consent page, you
get the default scopes, which seems the opposite of what you probably
intended. Currently, mod_tokenauth will do the same thing, so work is
needed there too to allow issuing tokens without roles.
A token without a role could be used for OIDC login, and not much else.
This seems like a valuable thing to support.
--- a/mod_http_oauth2/mod_http_oauth2.lua Sun May 07 19:40:57 2023 +0200
+++ b/mod_http_oauth2/mod_http_oauth2.lua Sun May 07 19:29:15 2023 +0200
@@ -124,8 +124,7 @@
end
end
end
- -- otherwise the default role
- return usermanager.get_user_role(username, module.host).name;
+ -- otherwise no role
end
local function filter_scopes(username, requested_scope_string)