This little script will test if you are able to connect to the AD/LDAP Connector endpoint with Websockets.
To run this:
- Save the file
troubleshootws.js
in your AD/LDAP Connector folder. - Run:
node troubleshootws
var WebSocket = require('ws'); | |
var server = 'login.auth0.com'; | |
console.log('Testing:', server); | |
var ws = new WebSocket('wss://' + server + '/lo/hub'); | |
ws.on('open', function () { | |
console.log('Connection to hub %s.', 'succeeded'); | |
ws.close(); | |
}).on('message', function (msg) { | |
console.log('Message received: %s.', msg); | |
ws.close(); | |
}).on('error', function (err) { | |
console.log('Connection to hub %s.', 'failed'); | |
console.log(' > Body: %s', err); | |
ws.close(); | |
}); |