Diff

mod_http_oauth2/mod_http_oauth2.lua @ 5425:3b30635d215c

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.
author Kim Alvefur <zash@zash.se>
date Sun, 07 May 2023 19:29:15 +0200
parent 5424:b45d9a81b3da
child 5426:f75d95f27da7
line wrap: on
line diff
--- 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)