Mercurial > prosody-modules
view mod_tcpproxy/web/demo.html @ 6232:2505542c6c50
mod_http_oauth2: Deduplicate client authentication
Since it is always performed by each grant_type_handler, it can now be
done earlier before dispatching to them.
A note on 4f0ed0e3ad5a: Requiring a client in the password grant broke
use without registering a client, e.g. the Snikket Web Portal.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sat, 31 May 2025 13:36:39 +0200 |
| parents | 7dbde05b48a9 |
| children |
line wrap: on
line source
<html> <head> <script type="text/javascript" src="xmpp.io.js"></script> <script type="text/javascript" src="strophe.js"></script> <script type="text/javascript" src="src/jquery-1.4.2.min.js"></script> <script type="text/javascript"> function handle_connection_status(status, err) { console.log("XMPP status: "+Strophe.Status.CONNECTED); if(status == Strophe.Status.CONNECTED) { var conn = new XMPPIO(xmppconn, "tcp.localhost"); conn.addListener("connect", function () { var req = "GET / HTTP/1.0\r\nHost: example.com\r\n\r\n"; console.log("Sending request: "+req); conn.write(req); }); conn.addListener("data", function (data) { $("<div/>").text(data).appendTo("body"); }); console.log("Connecting to example.com:80..."); conn.connect("example.com", 80); } } var xmppconn = new Strophe.Connection("/http-bind"); xmppconn.connect("anon.localhost", null, handle_connection_status, 50); </script> </head> <body> </body> </html>
