Email Login

This commit is contained in:
Georg Reisinger
2019-02-24 19:27:42 +01:00
parent f853a2bf0f
commit 3baf79e8f6
39 changed files with 3246 additions and 2982 deletions

View File

@ -12,29 +12,35 @@ var greenlock = Greenlock.create({
// Let's Encrypt v2 is ACME draft 11
// Note: If at first you don't succeed, stop and switch to staging
// https://acme-staging-v02.api.letsencrypt.org/directory
server: 'https://acme-v02.api.letsencrypt.org/directory'
, version: 'draft-11'
, configDir: '~/.config/acme/'
, app: require('./my-express-app.js')
server: 'https://acme-v02.api.letsencrypt.org/directory',
version: 'draft-11',
configDir: '~/.config/acme/',
app: require('./my-express-app.js')
// You MUST change these to a valid email and domains
, email: 'john.doe@example.com'
, approvedDomains: [ 'example.com', 'www.example.com' ]
, agreeTos: true
// You MUST change these to a valid email and domains
,
email: 'john.doe@example.com',
approvedDomains: ['example.com', 'www.example.com'],
agreeTos: true
// Get notified of important updates and help me make greenlock better
, communityMember: true
, telemetry: true
//, debug: true
// Get notified of important updates and help me make greenlock better
,
communityMember: true,
telemetry: true
//, debug: true
});
var server = greenlock.listen(80, 443);
var WebSocket = require('ws');
var ws = new WebSocket.Server({ server: server });
var ws = new WebSocket.Server({
server: server
});
ws.on('connection', function (ws, req) {
// inspect req.headers.authorization (or cookies) for session info
ws.send("[Secure Echo Server] Hello!\nAuth: '" + (req.headers.authorization || 'none') + "'\n"
+ "Cookie: '" + (req.headers.cookie || 'none') + "'\n");
ws.on('message', function (data) { ws.send(data); });
});
ws.send("[Secure Echo Server] Hello!\nAuth: '" + (req.headers.authorization || 'none') + "'\n" +
"Cookie: '" + (req.headers.cookie || 'none') + "'\n");
ws.on('message', function (data) {
ws.send(data);
});
});