annotate mod_jsxc/templates/template.html @ 5193:2bb29ece216b

mod_http_oauth2: Implement stateless dynamic client registration Replaces previous explicit registration that required either the additional module mod_adhoc_oauth2_client or manually editing the database. That method was enough to have something to test with, but would not probably not scale easily. Dynamic client registration allows creating clients on the fly, which may be even easier in theory. In order to not allow basically unauthenticated writes to the database, we implement a stateless model here. per_host_key := HMAC(config -> oauth2_registration_key, hostname) client_id := JWT { client metadata } signed with per_host_key client_secret := HMAC(per_host_key, client_id) This should ensure everything we need to know is part of the client_id, allowing redirects etc to be validated, and the client_secret can be validated with only the client_id and the per_host_key. A nonce injected into the client_id JWT should ensure nobody can submit the same client metadata and retrieve the same client_secret
author Kim Alvefur <zash@zash.se>
date Fri, 03 Mar 2023 21:14:19 +0100
parents 3a5fbb6c61b3
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3598
1921ae4449b8 mod_conversejs: Separate out templates into separate configurable files (breaks 0.9 compat)
Kim Alvefur <zash@zash.se>
parents:
diff changeset
1 <!DOCTYPE html>
1921ae4449b8 mod_conversejs: Separate out templates into separate configurable files (breaks 0.9 compat)
Kim Alvefur <zash@zash.se>
parents:
diff changeset
2 <html>
1921ae4449b8 mod_conversejs: Separate out templates into separate configurable files (breaks 0.9 compat)
Kim Alvefur <zash@zash.se>
parents:
diff changeset
3 <head>
1921ae4449b8 mod_conversejs: Separate out templates into separate configurable files (breaks 0.9 compat)
Kim Alvefur <zash@zash.se>
parents:
diff changeset
4 <meta charset="utf-8">
3600
f32efd448794 mod_conversejs: Set viewport scale hack (closes #1361)
Kim Alvefur <zash@zash.se>
parents: 3599
diff changeset
5 <meta name="viewport" content="width=device-width, initial-scale=1">
3598
1921ae4449b8 mod_conversejs: Separate out templates into separate configurable files (breaks 0.9 compat)
Kim Alvefur <zash@zash.se>
parents:
diff changeset
6 {header_style#
1921ae4449b8 mod_conversejs: Separate out templates into separate configurable files (breaks 0.9 compat)
Kim Alvefur <zash@zash.se>
parents:
diff changeset
7 <link rel="stylesheet" type="text/css" media="screen" href="{item}"/>}
1921ae4449b8 mod_conversejs: Separate out templates into separate configurable files (breaks 0.9 compat)
Kim Alvefur <zash@zash.se>
parents:
diff changeset
8 {header_scripts#
1921ae4449b8 mod_conversejs: Separate out templates into separate configurable files (breaks 0.9 compat)
Kim Alvefur <zash@zash.se>
parents:
diff changeset
9 <script charset="utf-8" src="{item}"></script>}
4825
4bdfd83e091f mod_jsxc: Demo module serving JSXC relatively easily from Prosody
Kim Alvefur <zash@zash.se>
parents: 4823
diff changeset
10 <title>{service_name?Prosody IM and JSXC}</title>
3598
1921ae4449b8 mod_conversejs: Separate out templates into separate configurable files (breaks 0.9 compat)
Kim Alvefur <zash@zash.se>
parents:
diff changeset
11 {header_tags#
1921ae4449b8 mod_conversejs: Separate out templates into separate configurable files (breaks 0.9 compat)
Kim Alvefur <zash@zash.se>
parents:
diff changeset
12 {item!}}
1921ae4449b8 mod_conversejs: Separate out templates into separate configurable files (breaks 0.9 compat)
Kim Alvefur <zash@zash.se>
parents:
diff changeset
13 </head>
1921ae4449b8 mod_conversejs: Separate out templates into separate configurable files (breaks 0.9 compat)
Kim Alvefur <zash@zash.se>
parents:
diff changeset
14 <body>
4826
3a5fbb6c61b3 mod_jsxc: Try not to put username and password into the ?query ...
Kim Alvefur <zash@zash.se>
parents: 4825
diff changeset
15 <form id="jsxc_login_form" action="javascript:">
4825
4bdfd83e091f mod_jsxc: Demo module serving JSXC relatively easily from Prosody
Kim Alvefur <zash@zash.se>
parents: 4823
diff changeset
16 <dl>
4bdfd83e091f mod_jsxc: Demo module serving JSXC relatively easily from Prosody
Kim Alvefur <zash@zash.se>
parents: 4823
diff changeset
17 <dt><label for="jsxc_username">Username</label></dt>
4bdfd83e091f mod_jsxc: Demo module serving JSXC relatively easily from Prosody
Kim Alvefur <zash@zash.se>
parents: 4823
diff changeset
18 <dd><input id="jsxc_username" name="username" placeholder="Alice"/></dd>
4bdfd83e091f mod_jsxc: Demo module serving JSXC relatively easily from Prosody
Kim Alvefur <zash@zash.se>
parents: 4823
diff changeset
19 <dt><label for="jsxc_password">Password</label></dt>
4bdfd83e091f mod_jsxc: Demo module serving JSXC relatively easily from Prosody
Kim Alvefur <zash@zash.se>
parents: 4823
diff changeset
20 <dd><input id="jsxc_password" name="password" type="password"/></dd>
4bdfd83e091f mod_jsxc: Demo module serving JSXC relatively easily from Prosody
Kim Alvefur <zash@zash.se>
parents: 4823
diff changeset
21 </dl>
4bdfd83e091f mod_jsxc: Demo module serving JSXC relatively easily from Prosody
Kim Alvefur <zash@zash.se>
parents: 4823
diff changeset
22 <button type="submit">Login</button>
4bdfd83e091f mod_jsxc: Demo module serving JSXC relatively easily from Prosody
Kim Alvefur <zash@zash.se>
parents: 4823
diff changeset
23 </form>
4bdfd83e091f mod_jsxc: Demo module serving JSXC relatively easily from Prosody
Kim Alvefur <zash@zash.se>
parents: 4823
diff changeset
24
4bdfd83e091f mod_jsxc: Demo module serving JSXC relatively easily from Prosody
Kim Alvefur <zash@zash.se>
parents: 4823
diff changeset
25 <script>{jsxcjs.startup.script!}</script>
3598
1921ae4449b8 mod_conversejs: Separate out templates into separate configurable files (breaks 0.9 compat)
Kim Alvefur <zash@zash.se>
parents:
diff changeset
26 </body>
1921ae4449b8 mod_conversejs: Separate out templates into separate configurable files (breaks 0.9 compat)
Kim Alvefur <zash@zash.se>
parents:
diff changeset
27 </html>