load oauth3 device by devicename
This commit is contained in:
parent
0e31557576
commit
89f26753bf
|
@ -63,6 +63,7 @@ module.exports.create = function (opts, servers) {
|
||||||
refreshToken: opts.refreshToken
|
refreshToken: opts.refreshToken
|
||||||
, email: opts.email
|
, email: opts.email
|
||||||
, domains: [ opts.servername ]
|
, domains: [ opts.servername ]
|
||||||
|
, device: { hostname: opts.devicename || opts.device }
|
||||||
}).then(function (result) {
|
}).then(function (result) {
|
||||||
// { jwt, tunnelUrl }
|
// { jwt, tunnelUrl }
|
||||||
return stunnel.connect({
|
return stunnel.connect({
|
||||||
|
|
5
serve.js
5
serve.js
|
@ -109,7 +109,7 @@ function createServer(port, pubdir, content, opts) {
|
||||||
var webrootPath = require('os').tmpdir();
|
var webrootPath = require('os').tmpdir();
|
||||||
var leChallengeFs = require('le-challenge-fs').create({ webrootPath: webrootPath });
|
var leChallengeFs = require('le-challenge-fs').create({ webrootPath: webrootPath });
|
||||||
//var leChallengeSni = require('le-challenge-sni').create({ webrootPath: webrootPath });
|
//var leChallengeSni = require('le-challenge-sni').create({ webrootPath: webrootPath });
|
||||||
var leChallengeDns = require('le-challenge-dns').create({ ttl: 1 });
|
var leChallengeDdns = require('le-challenge-ddns').create({ ttl: 1 });
|
||||||
var lex = require('letsencrypt-express').create({
|
var lex = require('letsencrypt-express').create({
|
||||||
// set to https://acme-v01.api.letsencrypt.org/directory in production
|
// set to https://acme-v01.api.letsencrypt.org/directory in production
|
||||||
server: opts.debug ? 'staging' : 'https://acme-v01.api.letsencrypt.org/directory'
|
server: opts.debug ? 'staging' : 'https://acme-v01.api.letsencrypt.org/directory'
|
||||||
|
@ -119,7 +119,7 @@ function createServer(port, pubdir, content, opts) {
|
||||||
, challenges: {
|
, challenges: {
|
||||||
'http-01': leChallengeFs
|
'http-01': leChallengeFs
|
||||||
, 'tls-sni-01': leChallengeFs // leChallengeSni
|
, 'tls-sni-01': leChallengeFs // leChallengeSni
|
||||||
, 'dns-01': leChallengeDns
|
, 'dns-01': leChallengeDdns
|
||||||
}
|
}
|
||||||
, challengeType: (opts.tunnel ? 'http-01' : 'dns-01')
|
, challengeType: (opts.tunnel ? 'http-01' : 'dns-01')
|
||||||
, store: require('le-store-certbot').create({ webrootPath: webrootPath })
|
, store: require('le-store-certbot').create({ webrootPath: webrootPath })
|
||||||
|
@ -242,6 +242,7 @@ function run() {
|
||||||
var opts = {
|
var opts = {
|
||||||
agreeTos: argv.agreeTos || argv['agree-tos']
|
agreeTos: argv.agreeTos || argv['agree-tos']
|
||||||
, debug: argv.debug
|
, debug: argv.debug
|
||||||
|
, device: argv.device
|
||||||
, email: argv.email
|
, email: argv.email
|
||||||
, httpsOptions: {
|
, httpsOptions: {
|
||||||
key: httpsOptions.key
|
key: httpsOptions.key
|
||||||
|
|
Loading…
Reference in New Issue