comparison mod_http_oauth2/html/consent.html @ 5653:62c6e17a5e9d

Merge
author Stephen Paul Weber <singpolyma@singpolyma.net>
date Mon, 18 Sep 2023 08:24:19 -0500
parents 401356232e1b
children 111eeffb6adf
comparison
equal deleted inserted replaced
5652:eade7ff9f52c 5653:62c6e17a5e9d
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html lang="en">
3 <head> 3 <head>
4 <meta charset="utf-8"> 4 <meta charset="utf-8" />
5 <meta name="viewport" content="width=device-width, initial-scale=1" /> 5 <meta name="viewport" content="width=device-width, initial-scale=1" />
6 <title>{site_name} - Authorize {client.client_name}</title> 6 <title>{site_name} - Authorize {client.client_name}</title>
7 <link rel="stylesheet" href="style.css"> 7 <link rel="stylesheet" href="style.css" />
8 </head> 8 </head>
9 <body> 9 <body>
10 {state.error&
11 <dialog open="" class="error">
12 <p>{state.error}</p>
13 <form method="dialog"><button>dismiss</button></form>
14 </dialog>}
15 <header>
16 <h1>{site_name}</h1>
17 </header>
10 <main> 18 <main>
11 {state.error&<div class="error">
12 <p>{state.error}</p>
13 </div>}
14
15 <h1>{site_name}</h1>
16 <fieldset> 19 <fieldset>
17 <legend>Authorize new application</legend> 20 <legend>Authorize new application</legend>
18 <p>A new application wants to connect to your account.</p> 21 <p>A new application wants to connect to your account.</p>
22 <form method="post">
19 <dl> 23 <dl>
20 <dt>Name</dt> 24 <dt>Name</dt>
21 <dd>{client.client_name}</dd> 25 <dd>{client.client_name}</dd>
22 <dt>Website</dt> 26 <dt>Website</dt>
23 <dd><a href="{client.client_uri}">{client.client_uri}</a></dd> 27 <dd><a href="{client.client_uri}">{client.client_uri}</a></dd>
27 <dd><a href="{client.tos_uri}">View terms</a></dd>} 31 <dd><a href="{client.tos_uri}">View terms</a></dd>}
28 32
29 {client.policy_uri& 33 {client.policy_uri&
30 <dt>Policy</dt> 34 <dt>Policy</dt>
31 <dd><a href="{client.policy_uri}">View policy</a></dd>} 35 <dd><a href="{client.policy_uri}">View policy</a></dd>}
36
37 <dt>Requested permissions</dt>
38 <dd>{scopes#
39 <input class="scope" type="checkbox" id="scope_{idx}" name="scope" value="{item}" checked="" /><label class="scope" for="scope_{idx}">{item}</label>}
40 </dd>
32 </dl> 41 </dl>
33 42
34 <p>To allow <em>{client.client_name}</em> to access your account 43 <p>To allow <em>{client.client_name}</em> to access your account
35 <em>{state.user.username}@{state.user.host}</em> and associated data, 44 <em>{state.user.username}@{state.user.host}</em> and associated data,
36 select 'Allow'. Otherwise, select 'Deny'. 45 select 'Allow'. Otherwise, select 'Deny'.
37 </p> 46 </p>
38 47
39 <form method="post"> 48 <input type="hidden" name="user_token" value="{state.user.token}">
40 <details><summary>Requested permissions</summary>{scopes# 49 <button type="submit" name="consent" value="denied">Deny</button>
41 <input class="scope" type="checkbox" id="scope_{idx}" name="scope" value="{item}" checked><label class="scope" for="scope_{idx}">{item}</label>}{roles& 50 <button type="submit" name="consent" value="granted">Allow</button>
42 <select name="role">{roles#
43 <option value="{item.name}"{item.selected& selected}>{item.name}</option>}
44 </select>}
45 </details>
46 <input type="hidden" name="user_token" value="{state.user.token}">
47 <button type="submit" name="consent" value="denied">Deny</button>
48 <button type="submit" name="consent" value="granted">Allow</button>
49 </form> 51 </form>
50 </fieldset> 52 </fieldset>
51 </main> 53 </main>
52 </body> 54 </body>
53 </html> 55 </html>