diff mod_http_oauth2/html/consent.html @ 5271:3a1df3adad0c

mod_http_oauth2: Allow user to decide which requested scopes to grant These should at the very least be shown to the user, so they can decide whether to grant them. Considered whether to filter the requested scopes down to actually understood scopes that would be granted, but decided that this was a bit complex for a first step, since role role selection and other kinds of scopes are mixed into the same field here.
author Kim Alvefur <zash@zash.se>
date Thu, 23 Mar 2023 16:28:08 +0100
parents 7acf73d2ebb5
children f2c7bb3af600
line wrap: on
line diff
--- a/mod_http_oauth2/html/consent.html	Thu Mar 23 16:19:09 2023 +0100
+++ b/mod_http_oauth2/html/consent.html	Thu Mar 23 16:28:08 2023 +0100
@@ -37,6 +37,9 @@
 	</p>
 
 	<form method="post">
+		<details><summary>Requested permissions</summary>{scopes#
+			<input class="scope" type="checkbox" id="scope_{idx}" name="scope" value="{item}" checked><label class="scope" for="scope_{idx}">{item}</label>}
+		</details>
 		<input type="hidden" name="user_token" value="{state.user.token}">
 		<button type="submit" name="consent" value="denied">Deny</button>
 		<button type="submit" name="consent" value="granted">Allow</button>