v3.0.5: update for greenlock express v3

This commit is contained in:
AJ ONeal 2019-10-28 22:57:05 -06:00
parent b80ab1ae54
commit cc0dd5bb35
2 changed files with 28 additions and 22 deletions

View File

@ -1,19 +1,19 @@
'use strict';
//var request;
var defaults = {};
var _memdb = {};
module.exports.create = function(config) {
var memdb = config.cache || {};
var memdb = config.cache || _memdb;
return {
init: function(opts) {
//request = opts.request;
return null;
return Promise.resolve(null);
},
set: function(data) {
return Promise.resolve().then(function() {
// console.log('Add Key Auth URL', data);
var ch = data.challenge;
@ -21,9 +21,11 @@ module.exports.create = function(config) {
memdb[key] = ch.keyAuthorization;
return null;
});
},
get: function(data) {
return Promise.resolve().then(function() {
// console.log('List Key Auth URL', data);
var ch = data.challenge;
@ -34,9 +36,11 @@ module.exports.create = function(config) {
}
return null;
});
},
remove: function(data) {
return Promise.resolve().then(function() {
// console.log('Remove Key Auth URL', data);
var ch = data.challenge;
@ -44,6 +48,7 @@ module.exports.create = function(config) {
delete memdb[key];
return null;
});
}
};
};

View File

@ -1,9 +1,10 @@
{
"name": "acme-http-01-standalone",
"version": "3.0.0",
"version": "3.0.5",
"description": "HTTP Authentication (In-Memory) for Let's Encrypt for Node.js - ACME http-01 challenges w/ ACME.js and Greenlock.js",
"main": "index.js",
"files": [
"*.js",
"lib",
"test.js"
],