@steedos/accounts 2.2.52-beta.20 → 2.2.52-beta.24
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/LICENSE.txt +2 -3
- package/lib/core/index.js +18 -18
- package/lib/database-mongo/mongo.js +93 -90
- package/lib/database-mongo/mongo.js.map +1 -1
- package/lib/index.js +10 -5
- package/lib/index.js.map +1 -1
- package/lib/mail.js +2 -2
- package/lib/oauth2/stub/oidc-cert.js +1 -1
- package/lib/oauth2/stub/oidc-cert.js.map +1 -1
- package/lib/password/accounts-password.js +54 -41
- package/lib/password/accounts-password.js.map +1 -1
- package/lib/password/index.js +1 -1
- package/lib/password/index.js.map +1 -1
- package/lib/password/utils/encryption.js +3 -3
- package/lib/rest-express/endpoints/authorize.js +2 -2
- package/lib/rest-express/endpoints/get-user.js +2 -2
- package/lib/rest-express/endpoints/impersonate.js +2 -2
- package/lib/rest-express/endpoints/initServer.js +2 -2
- package/lib/rest-express/endpoints/login.js +2 -2
- package/lib/rest-express/endpoints/logout.js +2 -2
- package/lib/rest-express/endpoints/oauth/provider-callback.js +3 -3
- package/lib/rest-express/endpoints/oauth/provider-callback.js.map +1 -1
- package/lib/rest-express/endpoints/password/change-password.js +2 -2
- package/lib/rest-express/endpoints/password/register.js +2 -2
- package/lib/rest-express/endpoints/password/reset.js +4 -4
- package/lib/rest-express/endpoints/password/two-factor.js +6 -6
- package/lib/rest-express/endpoints/password/verify-email.js +6 -6
- package/lib/rest-express/endpoints/password/verify.js +4 -4
- package/lib/rest-express/endpoints/put-user-name.js +2 -2
- package/lib/rest-express/endpoints/refresh-access-token.js +2 -2
- package/lib/rest-express/endpoints/service-authenticate.js +2 -2
- package/lib/rest-express/endpoints/spaces.js +2 -2
- package/lib/rest-express/endpoints/steedos/create-tenant.js +2 -2
- package/lib/rest-express/endpoints/steedos/get-tenant.js +2 -2
- package/lib/rest-express/endpoints/steedos/settings.js +2 -2
- package/lib/rest-express/endpoints/update-session.js +2 -2
- package/lib/rest-express/express-middleware.js +1 -1
- package/lib/rest-express/express-middleware.js.map +1 -1
- package/lib/rest-express/user-loader.js +2 -2
- package/lib/rest-express/utils/steedos-auth.js +2 -2
- package/lib/rest-express/utils/steedos-auth.js.map +1 -1
- package/lib/rest-express/utils/users.js +4 -4
- package/lib/saml-idp/express-middleware.js +10 -10
- package/lib/saml-idp/express-middleware.js.map +1 -1
- package/lib/server/accounts-server.js +56 -30
- package/lib/server/accounts-server.js.map +1 -1
- package/lib/server/utils/email.js +2 -2
- package/lib/types/index.js +14 -14
- package/lib/types/index.js.map +1 -1
- package/package.json +6 -6
- package/src/database-mongo/mongo.ts +3 -0
- package/src/index.ts +5 -3
- package/src/password/accounts-password.ts +17 -5
- package/src/server/accounts-server.ts +26 -3
- package/src/server/types/jwt-data.ts +10 -1
- package/src/types/types/connection-informations.ts +9 -0
package/LICENSE.txt
CHANGED
|
@@ -6,9 +6,8 @@ To determine under which license you may use a file from the Steedos source code
|
|
|
6
6
|
please resort to the header of that file.
|
|
7
7
|
|
|
8
8
|
If the file has no header, the following rules apply
|
|
9
|
-
1.
|
|
10
|
-
2.
|
|
11
|
-
3. source code that is neither (1) nor (2) is licensed under AGPL, see License.AGPL.txt
|
|
9
|
+
1. enterprise features are licensed under Steedos Enterprise Terms, see License.enterprise.txt
|
|
10
|
+
2. source code that is neither (1) is licensed under MIT, see https://opensource.org/licenses/MIT
|
|
12
11
|
|
|
13
12
|
On request, licenses under different terms are available.
|
|
14
13
|
|
package/lib/core/index.js
CHANGED
|
@@ -7,9 +7,9 @@ var db_1 = require("../db");
|
|
|
7
7
|
var _ = require("lodash");
|
|
8
8
|
var chalk_1 = require("chalk");
|
|
9
9
|
var config = (0, objectql_1.getSteedosConfig)();
|
|
10
|
-
var getSettings = function () { return
|
|
10
|
+
var getSettings = function () { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
|
|
11
11
|
var tenant, spaceDoc, steedosService;
|
|
12
|
-
return
|
|
12
|
+
return tslib_1.__generator(this, function (_a) {
|
|
13
13
|
switch (_a.label) {
|
|
14
14
|
case 0:
|
|
15
15
|
tenant = {
|
|
@@ -55,9 +55,9 @@ var getSettings = function () { return (0, tslib_1.__awaiter)(void 0, void 0, vo
|
|
|
55
55
|
});
|
|
56
56
|
}); };
|
|
57
57
|
exports.getSettings = getSettings;
|
|
58
|
-
var getTenant = function (spaceId) { return
|
|
58
|
+
var getTenant = function (spaceId) { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
|
|
59
59
|
var spaceDoc, steedosService;
|
|
60
|
-
return
|
|
60
|
+
return tslib_1.__generator(this, function (_a) {
|
|
61
61
|
switch (_a.label) {
|
|
62
62
|
case 0:
|
|
63
63
|
if (!spaceId) {
|
|
@@ -86,9 +86,9 @@ var getTenant = function (spaceId) { return (0, tslib_1.__awaiter)(void 0, void
|
|
|
86
86
|
});
|
|
87
87
|
}); };
|
|
88
88
|
exports.getTenant = getTenant;
|
|
89
|
-
var spaceExists = function (spaceId) { return
|
|
89
|
+
var spaceExists = function (spaceId) { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
|
|
90
90
|
var spaceDoc;
|
|
91
|
-
return
|
|
91
|
+
return tslib_1.__generator(this, function (_a) {
|
|
92
92
|
switch (_a.label) {
|
|
93
93
|
case 0: return [4 /*yield*/, db_1.db.findOne("spaces", spaceId, { fields: ["name", "avatar", "avatar_dark", "background", "enable_register"] })];
|
|
94
94
|
case 1:
|
|
@@ -101,9 +101,9 @@ var spaceExists = function (spaceId) { return (0, tslib_1.__awaiter)(void 0, voi
|
|
|
101
101
|
});
|
|
102
102
|
}); };
|
|
103
103
|
exports.spaceExists = spaceExists;
|
|
104
|
-
var getMergedTenant = function (spaceId) { return
|
|
104
|
+
var getMergedTenant = function (spaceId) { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
|
|
105
105
|
var settings, tenant;
|
|
106
|
-
return
|
|
106
|
+
return tslib_1.__generator(this, function (_a) {
|
|
107
107
|
switch (_a.label) {
|
|
108
108
|
case 0: return [4 /*yield*/, (0, exports.getSettings)()];
|
|
109
109
|
case 1:
|
|
@@ -116,9 +116,9 @@ var getMergedTenant = function (spaceId) { return (0, tslib_1.__awaiter)(void 0,
|
|
|
116
116
|
});
|
|
117
117
|
}); };
|
|
118
118
|
exports.getMergedTenant = getMergedTenant;
|
|
119
|
-
var canRegister = function (spaceId, action) { return
|
|
119
|
+
var canRegister = function (spaceId, action) { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
|
|
120
120
|
var tenant;
|
|
121
|
-
return
|
|
121
|
+
return tslib_1.__generator(this, function (_a) {
|
|
122
122
|
switch (_a.label) {
|
|
123
123
|
case 0: return [4 /*yield*/, (0, exports.getMergedTenant)(spaceId)];
|
|
124
124
|
case 1:
|
|
@@ -137,9 +137,9 @@ var canRegister = function (spaceId, action) { return (0, tslib_1.__awaiter)(voi
|
|
|
137
137
|
});
|
|
138
138
|
}); };
|
|
139
139
|
exports.canRegister = canRegister;
|
|
140
|
-
var loginWithCode = function (spaceId) { return
|
|
140
|
+
var loginWithCode = function (spaceId) { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
|
|
141
141
|
var loginWithCode, tenant;
|
|
142
|
-
return
|
|
142
|
+
return tslib_1.__generator(this, function (_a) {
|
|
143
143
|
switch (_a.label) {
|
|
144
144
|
case 0:
|
|
145
145
|
loginWithCode = false;
|
|
@@ -154,9 +154,9 @@ var loginWithCode = function (spaceId) { return (0, tslib_1.__awaiter)(void 0, v
|
|
|
154
154
|
});
|
|
155
155
|
}); };
|
|
156
156
|
exports.loginWithCode = loginWithCode;
|
|
157
|
-
var canPasswordLogin = function () { return
|
|
157
|
+
var canPasswordLogin = function () { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
|
|
158
158
|
var tenant;
|
|
159
|
-
return
|
|
159
|
+
return tslib_1.__generator(this, function (_a) {
|
|
160
160
|
switch (_a.label) {
|
|
161
161
|
case 0: return [4 /*yield*/, (0, exports.getMergedTenant)()];
|
|
162
162
|
case 1:
|
|
@@ -235,9 +235,9 @@ var getSteedosService = function () {
|
|
|
235
235
|
return steedosService;
|
|
236
236
|
};
|
|
237
237
|
exports.getSteedosService = getSteedosService;
|
|
238
|
-
var sendMail = function (mail) { return
|
|
238
|
+
var sendMail = function (mail) { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
|
|
239
239
|
var to, subject, html, config, canSend;
|
|
240
|
-
return
|
|
240
|
+
return tslib_1.__generator(this, function (_a) {
|
|
241
241
|
to = mail.to, subject = mail.subject, html = mail.html;
|
|
242
242
|
config = (0, objectql_1.getSteedosConfig)().email || {};
|
|
243
243
|
canSend = (0, exports.canSendEmail)();
|
|
@@ -259,9 +259,9 @@ var sendMail = function (mail) { return (0, tslib_1.__awaiter)(void 0, void 0, v
|
|
|
259
259
|
});
|
|
260
260
|
}); };
|
|
261
261
|
exports.sendMail = sendMail;
|
|
262
|
-
var sendSMS = function (sms) { return
|
|
262
|
+
var sendSMS = function (sms) { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
|
|
263
263
|
var mobile, message, spaceId, canSend;
|
|
264
|
-
return
|
|
264
|
+
return tslib_1.__generator(this, function (_a) {
|
|
265
265
|
mobile = sms.mobile, message = sms.message, spaceId = sms.spaceId;
|
|
266
266
|
canSend = (0, exports.canSendSMS)();
|
|
267
267
|
console.log(chalk_1.default.green("SMS: ".concat(mobile, ", ").concat(message)));
|