spec-3nweb-server 1.7.12 → 1.7.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/{config/cli → cli}/index.d.ts +1 -0
- package/build/{config/cli → cli}/index.js +9 -2
- package/build/cli/show-sample-config.d.ts +3 -0
- package/build/cli/show-sample-config.js +75 -0
- package/build/config/letsencrypt.js +5 -3
- package/build/lib-server/resources/mailerid-authorizer.d.ts +6 -1
- package/build/lib-server/resources/mailerid-authorizer.js +6 -5
- package/build/lib-server/routes/sessions/mid-auth.js +3 -3
- package/build/mailerId/mailerId-app.d.ts +5 -1
- package/build/mailerId/mailerId-app.js +8 -2
- package/build/main.js +29 -10
- package/build/services.js +8 -3
- package/package.json +1 -1
- /package/build/{config/cli → cli}/run-cmd.d.ts +0 -0
- /package/build/{config/cli → cli}/run-cmd.js +0 -0
- /package/build/{config/cli → cli}/signup-cmd.d.ts +0 -0
- /package/build/{config/cli → cli}/signup-cmd.js +0 -0
- /package/build/{config/cli → cli}/user-cmd.d.ts +0 -0
- /package/build/{config/cli → cli}/user-cmd.js +0 -0
- /package/build/{config/cli → cli}/utils.d.ts +0 -0
- /package/build/{config/cli → cli}/utils.js +0 -0
|
@@ -17,8 +17,9 @@
|
|
|
17
17
|
*/
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
19
|
exports.parseProcessArgv = void 0;
|
|
20
|
-
const default_confs_1 = require("../default-confs");
|
|
20
|
+
const default_confs_1 = require("../config/default-confs");
|
|
21
21
|
const run_cmd_1 = require("./run-cmd");
|
|
22
|
+
const show_sample_config_1 = require("./show-sample-config");
|
|
22
23
|
const signup_cmd_1 = require("./signup-cmd");
|
|
23
24
|
const utils_1 = require("./utils");
|
|
24
25
|
function mainUsage(execName) {
|
|
@@ -35,7 +36,8 @@ function mainUsage(execName) {
|
|
|
35
36
|
header: 'Available commands:',
|
|
36
37
|
content: [
|
|
37
38
|
run_cmd_1.runCmd,
|
|
38
|
-
signup_cmd_1.signupCmd
|
|
39
|
+
signup_cmd_1.signupCmd,
|
|
40
|
+
show_sample_config_1.showSampleConfigCmd
|
|
39
41
|
]
|
|
40
42
|
},
|
|
41
43
|
{
|
|
@@ -55,6 +57,11 @@ function parseProcessArgv() {
|
|
|
55
57
|
else if (args[0] === signup_cmd_1.signupCmd.name) {
|
|
56
58
|
return (0, signup_cmd_1.parseSignupArgs)(args.slice(1), default_confs_1.EXECUTABLE_NAME);
|
|
57
59
|
}
|
|
60
|
+
else if (args[0] === show_sample_config_1.showSampleConfigCmd.name) {
|
|
61
|
+
return { showSampleConfig: {
|
|
62
|
+
txtToDisplay: show_sample_config_1.sampleConfig, exitStatus: 0
|
|
63
|
+
} };
|
|
64
|
+
}
|
|
58
65
|
else {
|
|
59
66
|
const opts = (0, utils_1.parseArgv)(args, [utils_1.helpOpt], { partial: true });
|
|
60
67
|
if (opts.help) {
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { CommandDef } from "./utils";
|
|
2
|
+
export declare const showSampleConfigCmd: CommandDef<'show-sample-config'>;
|
|
3
|
+
export declare const sampleConfig = "\n# This is a sample configuration yaml file.\n# Uncomment and set required values.\n# Default path of this file is /etc/3nweb/conf.yaml\n\n# Uncomment to enable service\nenabledServices:\n # asmail: true\n # storage: true\n # mailerId: true\n\n# Data root folder. Set non-default value, if required.\n# rootFolder: /var/3nweb\n\n# Customize domain at which clients reach this server from an outside.\n# This value is used by users' MailerId-based login: assertion challenges\n# cryptographically imprint this domain to assure client that there is no\n# missuse.\ndomain: service-for.example.com\n\n# If MailerId provider service is enabled, this is its configuration\nmailerId:\n certs: /etc/3nweb/mailerid/certs\n\n# Customize servicesConnect before starting this server.\nservicesConnect:\n\n port: 7070\n # Hostname allows to restrict on which address service is listening for incoming connections\n # hostname: \"1.2.3.4\"\n\n # Uncomment path to Let's Encrypt folder, if it is used. This implicitly tells\n # server to HTTPS with given certificates.\n # letsencrypt: /etc/letsencrypt/live/service-for.example.com\n\n # By default HTTPS service reloads when certificates change. Skip, if required.\n # skipReloadOnCertsChange: false\n\n # Set TLS cert and key to do HTTPS. Use either this, or letsencrypt, but not both.\n # sslOpts: {\n # It is Node's https.ServerOptions. Follow https://nodejs.org/docs/latest/api/https.html\n # }\n\n# Configuration for signup service that creates new accounts on this server.\n# Comment out to disable signup service completely.\n# Note that signup cli commands should be used to create token, without which\n# signup doesn't happen, unless a no-token configuration file is provided.\nsignup: {\n # noTokenFile: /some/path/to/json\n}\n";
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
Copyright (C) 2025 3NSoft Inc.
|
|
4
|
+
|
|
5
|
+
This program is free software: you can redistribute it and/or modify it under
|
|
6
|
+
the terms of the GNU General Public License as published by the Free Software
|
|
7
|
+
Foundation, either version 3 of the License, or (at your option) any later
|
|
8
|
+
version.
|
|
9
|
+
|
|
10
|
+
This program is distributed in the hope that it will be useful, but
|
|
11
|
+
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
13
|
+
See the GNU General Public License for more details.
|
|
14
|
+
|
|
15
|
+
You should have received a copy of the GNU General Public License along with
|
|
16
|
+
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.sampleConfig = exports.showSampleConfigCmd = void 0;
|
|
20
|
+
exports.showSampleConfigCmd = {
|
|
21
|
+
name: 'show-sample-config',
|
|
22
|
+
summary: 'prints out a template configuration yaml file with comments'
|
|
23
|
+
};
|
|
24
|
+
exports.sampleConfig = `
|
|
25
|
+
# This is a sample configuration yaml file.
|
|
26
|
+
# Uncomment and set required values.
|
|
27
|
+
# Default path of this file is /etc/3nweb/conf.yaml
|
|
28
|
+
|
|
29
|
+
# Uncomment to enable service
|
|
30
|
+
enabledServices:
|
|
31
|
+
# asmail: true
|
|
32
|
+
# storage: true
|
|
33
|
+
# mailerId: true
|
|
34
|
+
|
|
35
|
+
# Data root folder. Set non-default value, if required.
|
|
36
|
+
# rootFolder: /var/3nweb
|
|
37
|
+
|
|
38
|
+
# Customize domain at which clients reach this server from an outside.
|
|
39
|
+
# This value is used by users' MailerId-based login: assertion challenges
|
|
40
|
+
# cryptographically imprint this domain to assure client that there is no
|
|
41
|
+
# missuse.
|
|
42
|
+
domain: service-for.example.com
|
|
43
|
+
|
|
44
|
+
# If MailerId provider service is enabled, this is its configuration
|
|
45
|
+
mailerId:
|
|
46
|
+
certs: /etc/3nweb/mailerid/certs
|
|
47
|
+
|
|
48
|
+
# Customize servicesConnect before starting this server.
|
|
49
|
+
servicesConnect:
|
|
50
|
+
|
|
51
|
+
port: 7070
|
|
52
|
+
# Hostname allows to restrict on which address service is listening for incoming connections
|
|
53
|
+
# hostname: "1.2.3.4"
|
|
54
|
+
|
|
55
|
+
# Uncomment path to Let's Encrypt folder, if it is used. This implicitly tells
|
|
56
|
+
# server to HTTPS with given certificates.
|
|
57
|
+
# letsencrypt: /etc/letsencrypt/live/service-for.example.com
|
|
58
|
+
|
|
59
|
+
# By default HTTPS service reloads when certificates change. Skip, if required.
|
|
60
|
+
# skipReloadOnCertsChange: false
|
|
61
|
+
|
|
62
|
+
# Set TLS cert and key to do HTTPS. Use either this, or letsencrypt, but not both.
|
|
63
|
+
# sslOpts: {
|
|
64
|
+
# It is Node's https.ServerOptions. Follow https://nodejs.org/docs/latest/api/https.html
|
|
65
|
+
# }
|
|
66
|
+
|
|
67
|
+
# Configuration for signup service that creates new accounts on this server.
|
|
68
|
+
# Comment out to disable signup service completely.
|
|
69
|
+
# Note that signup cli commands should be used to create token, without which
|
|
70
|
+
# signup doesn't happen, unless a no-token configuration file is provided.
|
|
71
|
+
signup: {
|
|
72
|
+
# noTokenFile: /some/path/to/json
|
|
73
|
+
}
|
|
74
|
+
`;
|
|
75
|
+
Object.freeze(exports);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
Copyright (C) 2023 3NSoft Inc.
|
|
3
|
+
Copyright (C) 2023, 2025 3NSoft Inc.
|
|
4
4
|
|
|
5
5
|
This program is free software: you can redistribute it and/or modify it under
|
|
6
6
|
the terms of the GNU General Public License as published by the Free Software
|
|
@@ -19,13 +19,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
19
19
|
exports.sslOptsFromConfig = void 0;
|
|
20
20
|
const fs_1 = require("fs");
|
|
21
21
|
const path_1 = require("path");
|
|
22
|
+
const LETSENCRYPT_CERT_FILE = 'fullchain.pem';
|
|
23
|
+
const LETSENCRYPT_KEY_FILE = 'privkey.pem';
|
|
22
24
|
function sslOptsFromConfig(letsencrypt, sslOpts, skipReloadOnCertsChange) {
|
|
23
25
|
if (!sslOpts) {
|
|
24
26
|
sslOpts = {};
|
|
25
27
|
}
|
|
26
28
|
if (letsencrypt) {
|
|
27
|
-
sslOpts.cert = (0, fs_1.readFileSync)((0, path_1.join)(letsencrypt,
|
|
28
|
-
sslOpts.key = (0, fs_1.readFileSync)((0, path_1.join)(letsencrypt,
|
|
29
|
+
sslOpts.cert = (0, fs_1.readFileSync)((0, path_1.join)(letsencrypt, LETSENCRYPT_CERT_FILE));
|
|
30
|
+
sslOpts.key = (0, fs_1.readFileSync)((0, path_1.join)(letsencrypt, LETSENCRYPT_KEY_FILE));
|
|
29
31
|
if (skipReloadOnCertsChange) {
|
|
30
32
|
return { sslOpts };
|
|
31
33
|
}
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
+
import { SignedLoad } from '../../lib-common/jwkeys';
|
|
1
2
|
import { MidAuthorizer } from '../routes/sessions/mid-auth';
|
|
2
|
-
export declare function validator(): MidAuthorizer;
|
|
3
|
+
export declare function validator(ownMidService: OwnMidService | undefined): MidAuthorizer;
|
|
4
|
+
export interface OwnMidService {
|
|
5
|
+
domain: string;
|
|
6
|
+
getRoot: () => SignedLoad;
|
|
7
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
Copyright (C) 2015 - 2016, 2019 3NSoft Inc.
|
|
3
|
+
Copyright (C) 2015 - 2016, 2019, 2025 3NSoft Inc.
|
|
4
4
|
|
|
5
5
|
This program is free software: you can redistribute it and/or modify it under
|
|
6
6
|
the terms of the GNU General Public License as published by the Free Software
|
|
@@ -62,11 +62,11 @@ function getRootCert(serviceURL) {
|
|
|
62
62
|
}
|
|
63
63
|
// TODO need to add caching of certs using domain->(kid->cert)
|
|
64
64
|
// (this will speed things up)
|
|
65
|
-
function validator() {
|
|
66
|
-
return (rpDomain, sessionId, userId, assertion, userCert, provCert) => validate(rpDomain, sessionId, userId, assertion, userCert, provCert);
|
|
65
|
+
function validator(ownMidService) {
|
|
66
|
+
return (rpDomain, sessionId, userId, assertion, userCert, provCert) => validate(rpDomain, sessionId, userId, assertion, userCert, provCert, ownMidService);
|
|
67
67
|
}
|
|
68
68
|
exports.validator = validator;
|
|
69
|
-
async function validate(rpDomain, sessionId, userId, assertion, userCert, provCert) {
|
|
69
|
+
async function validate(rpDomain, sessionId, userId, assertion, userCert, provCert, ownMidService) {
|
|
70
70
|
const validAt = Date.now() / 1000;
|
|
71
71
|
try {
|
|
72
72
|
// check that certificate is for the user
|
|
@@ -83,7 +83,8 @@ async function validate(rpDomain, sessionId, userId, assertion, userCert, provCe
|
|
|
83
83
|
return false;
|
|
84
84
|
}
|
|
85
85
|
// get root certificate and check the whole chain
|
|
86
|
-
const rootCert =
|
|
86
|
+
const rootCert = ((ownMidService && (issuer === ownMidService.domain)) ?
|
|
87
|
+
ownMidService.getRoot() : await getRootCert(serviceURL));
|
|
87
88
|
const assertInfo = mid.relyingParty.verifyAssertion(assertion, { user: userCert, prov: provCert, root: rootCert }, issuer, validAt);
|
|
88
89
|
if ((assertInfo.relyingPartyDomain === rpDomain)
|
|
89
90
|
&& (assertInfo.sessionId === sessionId)) {
|
|
@@ -36,9 +36,9 @@ function midLogin(relyingPartyDomain, midAuthorizingFunc) {
|
|
|
36
36
|
}
|
|
37
37
|
const rb = req.body;
|
|
38
38
|
const sessionId = req.session.id;
|
|
39
|
-
if (!(0, jwkeys_1.isLikeSignedMailerIdAssertion)(rb.assertion)
|
|
40
|
-
!(0, jwkeys_1.isLikeSignedKeyCert)(rb.userCert)
|
|
41
|
-
!(0, jwkeys_1.isLikeSignedKeyCert)(rb.provCert)) {
|
|
39
|
+
if (!(0, jwkeys_1.isLikeSignedMailerIdAssertion)(rb.assertion)
|
|
40
|
+
|| !(0, jwkeys_1.isLikeSignedKeyCert)(rb.userCert)
|
|
41
|
+
|| !(0, jwkeys_1.isLikeSignedKeyCert)(rb.provCert)) {
|
|
42
42
|
res.sendStatus(login_1.ERR_SC.malformed);
|
|
43
43
|
req.session.close();
|
|
44
44
|
return;
|
|
@@ -4,4 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import * as express from 'express';
|
|
6
6
|
import { ErrLogger } from '../lib-server/middleware/error-handler';
|
|
7
|
-
|
|
7
|
+
import { OwnMidService } from '../lib-server/resources/mailerid-authorizer';
|
|
8
|
+
export declare function makeMailerIdApp(rootFolder: string, domain: string, certFile: string, errLogger?: ErrLogger): {
|
|
9
|
+
app: express.Express;
|
|
10
|
+
ownService: OwnMidService;
|
|
11
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
Copyright (C) 2015 - 2016, 2020, 2024 3NSoft Inc.
|
|
3
|
+
Copyright (C) 2015 - 2016, 2020, 2024 - 2025 3NSoft Inc.
|
|
4
4
|
|
|
5
5
|
This program is free software: you can redistribute it and/or modify it under
|
|
6
6
|
the terms of the GNU General Public License as published by the Free Software
|
|
@@ -64,7 +64,13 @@ function makeMailerIdApp(rootFolder, domain, certFile, errLogger) {
|
|
|
64
64
|
res.status(200).json(json); // content type application/json
|
|
65
65
|
});
|
|
66
66
|
app.use((0, error_handler_1.makeErrHandler)(errLogger));
|
|
67
|
-
return
|
|
67
|
+
return {
|
|
68
|
+
app,
|
|
69
|
+
ownService: {
|
|
70
|
+
domain,
|
|
71
|
+
getRoot: () => certifier.getRootCert()
|
|
72
|
+
}
|
|
73
|
+
};
|
|
68
74
|
}
|
|
69
75
|
exports.makeMailerIdApp = makeMailerIdApp;
|
|
70
76
|
Object.freeze(exports);
|
package/build/main.js
CHANGED
|
@@ -17,15 +17,16 @@
|
|
|
17
17
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
18
18
|
*/
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
const cli_1 = require("./
|
|
20
|
+
const cli_1 = require("./cli");
|
|
21
21
|
const from_yaml_1 = require("./config/from-yaml");
|
|
22
22
|
const letsencrypt_1 = require("./config/letsencrypt");
|
|
23
23
|
const lib_1 = require("./lib");
|
|
24
24
|
const signup_1 = require("./config/signup");
|
|
25
25
|
const default_confs_1 = require("./config/default-confs");
|
|
26
|
+
const file_1 = require("./lib-common/exceptions/file");
|
|
26
27
|
async function run(conf) {
|
|
27
28
|
if (!conf.servicesConnect) {
|
|
28
|
-
console.error(
|
|
29
|
+
console.error(`❌ No connection settings found in configuration.`);
|
|
29
30
|
process.exit(-1);
|
|
30
31
|
return;
|
|
31
32
|
}
|
|
@@ -41,7 +42,7 @@ async function run(conf) {
|
|
|
41
42
|
return;
|
|
42
43
|
}
|
|
43
44
|
try {
|
|
44
|
-
console.log(
|
|
45
|
+
console.log(`🏁 Stopping app ...`);
|
|
45
46
|
await app.stop();
|
|
46
47
|
console.log(`app has stopped.`);
|
|
47
48
|
}
|
|
@@ -55,11 +56,11 @@ async function run(conf) {
|
|
|
55
56
|
}
|
|
56
57
|
async function startAppWithTLS(sslOpts, port, hostname) {
|
|
57
58
|
await app.start(sslOpts, port, hostname);
|
|
58
|
-
console.log(
|
|
59
|
+
console.log(`🚀 Started 3NWeb server on port ${port},${hostname ? ` hostname ${hostname},` : ''} with TLS.`);
|
|
59
60
|
}
|
|
60
61
|
async function startAppWithoutTLS(port, hostname) {
|
|
61
62
|
await app.start(undefined, port, hostname);
|
|
62
|
-
console.log(
|
|
63
|
+
console.log(`🚀 Started 3NWeb server on port ${port},${hostname ? ` hostname ${hostname},` : ''} without TLS, and requiring TLS reverse proxy infront.`);
|
|
63
64
|
}
|
|
64
65
|
try {
|
|
65
66
|
app = createApp(conf);
|
|
@@ -69,7 +70,7 @@ async function run(conf) {
|
|
|
69
70
|
await startAppWithTLS(tls.sslOpts, port, hostname);
|
|
70
71
|
if (!skipReloadOnCertsChange) {
|
|
71
72
|
tls.onCertsUpdate(async (newOpts, originalOpts) => {
|
|
72
|
-
console.log(
|
|
73
|
+
console.log(`🗘 Reloading server app server on TLS certificates change`);
|
|
73
74
|
try {
|
|
74
75
|
await stopProcess();
|
|
75
76
|
app = createApp(conf);
|
|
@@ -77,7 +78,7 @@ async function run(conf) {
|
|
|
77
78
|
}
|
|
78
79
|
catch (err) {
|
|
79
80
|
console.error(err);
|
|
80
|
-
console.log(
|
|
81
|
+
console.log(`⚠️ Failed to reload with new TLS certs. Attempting to load with original ones.`);
|
|
81
82
|
try {
|
|
82
83
|
await stopProcess();
|
|
83
84
|
app = createApp(conf);
|
|
@@ -118,7 +119,16 @@ function assembleConfig(configPath) {
|
|
|
118
119
|
configPath = default_confs_1.DEFAULT_CONFIG_PATH;
|
|
119
120
|
console.log(`Looking for configuration in default location: ${configPath}`);
|
|
120
121
|
}
|
|
121
|
-
|
|
122
|
+
try {
|
|
123
|
+
return (0, from_yaml_1.readYamlConfFile)(configPath);
|
|
124
|
+
}
|
|
125
|
+
catch (err) {
|
|
126
|
+
if (err.code === file_1.Code.notFound) {
|
|
127
|
+
console.error(`❌ Configuration file ${configPath} is not found.`);
|
|
128
|
+
process.exit(-2);
|
|
129
|
+
}
|
|
130
|
+
throw err;
|
|
131
|
+
}
|
|
122
132
|
}
|
|
123
133
|
async function displaySignupInfo(conf) {
|
|
124
134
|
if (!conf.signup) {
|
|
@@ -223,12 +233,21 @@ else if (cmd.signupCmd) {
|
|
|
223
233
|
}
|
|
224
234
|
}
|
|
225
235
|
else {
|
|
226
|
-
|
|
236
|
+
showUsage({
|
|
237
|
+
txtToDisplay: `❌ No recognized subcommand given to signup module`,
|
|
238
|
+
exitStatus: -1
|
|
239
|
+
});
|
|
227
240
|
}
|
|
228
241
|
}
|
|
242
|
+
else if (cmd.showSampleConfig) {
|
|
243
|
+
showUsage(cmd.showSampleConfig);
|
|
244
|
+
}
|
|
229
245
|
else if (cmd.showUsage) {
|
|
230
246
|
showUsage(cmd.showUsage);
|
|
231
247
|
}
|
|
232
248
|
else {
|
|
233
|
-
|
|
249
|
+
showUsage({
|
|
250
|
+
txtToDisplay: `❌ No recognized command given`,
|
|
251
|
+
exitStatus: -1
|
|
252
|
+
});
|
|
234
253
|
}
|
package/build/services.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
Copyright (C) 2015 - 2017, 2020, 2024 3NSoft Inc.
|
|
3
|
+
Copyright (C) 2015 - 2017, 2020, 2024 - 2025 3NSoft Inc.
|
|
4
4
|
|
|
5
5
|
This program is free software: you can redistribute it and/or modify it under
|
|
6
6
|
the terms of the GNU General Public License as published by the Free Software
|
|
@@ -30,12 +30,17 @@ function servicesApp(conf, errLogger, logSetup) {
|
|
|
30
30
|
throw new Error('Missing enabled-services sections in confs.');
|
|
31
31
|
}
|
|
32
32
|
const app = new app_1.AppWithWSs();
|
|
33
|
-
|
|
33
|
+
let midAuthorizer; // share, allowing for caching of certs
|
|
34
34
|
if (conf.enabledServices.mailerId) {
|
|
35
|
-
app
|
|
35
|
+
const { app: midApp, ownService } = (0, mailerId_app_1.makeMailerIdApp)(conf.rootFolder, conf.domain, conf.mailerId.certs, (errLogger === 'console') ? (0, error_handler_1.makeErrLoggerToConsole)('MailerId') : errLogger);
|
|
36
|
+
app.http.use('/mailerid', midApp);
|
|
36
37
|
if (logSetup === 'console') {
|
|
37
38
|
console.log(`Enabled MailerId service with provider domain ${conf.domain}`);
|
|
38
39
|
}
|
|
40
|
+
midAuthorizer = (0, mailerid_authorizer_1.validator)(ownService);
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
midAuthorizer = (0, mailerid_authorizer_1.validator)(undefined);
|
|
39
44
|
}
|
|
40
45
|
if (conf.enabledServices.asmail) {
|
|
41
46
|
app.use('/asmail', (0, asmail_app_1.makeASMailApp)(conf.rootFolder, conf.domain, midAuthorizer, (errLogger === 'console') ? (0, error_handler_1.makeErrLoggerToConsole)('ASMail') : errLogger));
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|