@mondomob/gae-node-nestjs 11.0.2 → 12.0.0-alpha-2
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/.claude/settings.local.json +7 -0
- package/CHANGELOG.md +0 -13
- package/mondomob-gae-node-nestjs-12.0.0-alpha-1.tgz +0 -0
- package/mondomob-gae-node-nestjs-12.0.0-alpha-2.tgz +0 -0
- package/package.json +12 -12
- package/server-start.js +72 -1
- package/dist/_test/mocks.d.ts +0 -9
- package/dist/_test/mocks.js +0 -27
- package/dist/_test/mocks.js.map +0 -1
- package/dist/_test/request-scope-test-utils.d.ts +0 -3
- package/dist/_test/request-scope-test-utils.js +0 -18
- package/dist/_test/request-scope-test-utils.js.map +0 -1
- package/dist/auth/auth-user.model.d.ts +0 -9
- package/dist/auth/auth-user.model.js +0 -33
- package/dist/auth/auth-user.model.js.map +0 -1
- package/dist/auth/auth.callbacks.d.ts +0 -8
- package/dist/auth/auth.callbacks.js +0 -5
- package/dist/auth/auth.callbacks.js.map +0 -1
- package/dist/auth/auth.configurer.d.ts +0 -35
- package/dist/auth/auth.configurer.js +0 -212
- package/dist/auth/auth.configurer.js.map +0 -1
- package/dist/auth/auth.controller.d.ts +0 -27
- package/dist/auth/auth.controller.js +0 -312
- package/dist/auth/auth.controller.js.map +0 -1
- package/dist/auth/auth.guard.d.ts +0 -16
- package/dist/auth/auth.guard.js +0 -127
- package/dist/auth/auth.guard.js.map +0 -1
- package/dist/auth/auth.listener.d.ts +0 -5
- package/dist/auth/auth.listener.js +0 -5
- package/dist/auth/auth.listener.js.map +0 -1
- package/dist/auth/auth.repository.d.ts +0 -52
- package/dist/auth/auth.repository.js +0 -79
- package/dist/auth/auth.repository.js.map +0 -1
- package/dist/auth/auth.resolver.d.ts +0 -13
- package/dist/auth/auth.resolver.js +0 -86
- package/dist/auth/auth.resolver.js.map +0 -1
- package/dist/auth/auth.service.d.ts +0 -35
- package/dist/auth/auth.service.js +0 -299
- package/dist/auth/auth.service.js.map +0 -1
- package/dist/auth/auth.task.controller.d.ts +0 -13
- package/dist/auth/auth.task.controller.js +0 -76
- package/dist/auth/auth.task.controller.js.map +0 -1
- package/dist/auth/auth.task.service.d.ts +0 -8
- package/dist/auth/auth.task.service.js +0 -26
- package/dist/auth/auth.task.service.js.map +0 -1
- package/dist/auth/csrf.interceptor.d.ts +0 -11
- package/dist/auth/csrf.interceptor.js +0 -38
- package/dist/auth/csrf.interceptor.js.map +0 -1
- package/dist/auth/invite-user.service.d.ts +0 -45
- package/dist/auth/invite-user.service.js +0 -215
- package/dist/auth/invite-user.service.js.map +0 -1
- package/dist/auth/invite.callbacks.d.ts +0 -6
- package/dist/auth/invite.callbacks.js +0 -5
- package/dist/auth/invite.callbacks.js.map +0 -1
- package/dist/auth/login-identifier.repository.d.ts +0 -13
- package/dist/auth/login-identifier.repository.js +0 -28
- package/dist/auth/login-identifier.repository.js.map +0 -1
- package/dist/auth/password-reset.service.d.ts +0 -15
- package/dist/auth/password-reset.service.js +0 -81
- package/dist/auth/password-reset.service.js.map +0 -1
- package/dist/auth/user.service.d.ts +0 -27
- package/dist/auth/user.service.js +0 -94
- package/dist/auth/user.service.js.map +0 -1
- package/dist/configuration.d.ts +0 -84
- package/dist/configuration.js +0 -5
- package/dist/configuration.js.map +0 -1
- package/dist/configure.d.ts +0 -40
- package/dist/configure.js +0 -85
- package/dist/configure.js.map +0 -1
- package/dist/context/context-middleware.d.ts +0 -15
- package/dist/context/context-middleware.js +0 -37
- package/dist/context/context-middleware.js.map +0 -1
- package/dist/context/context-request-scope.d.ts +0 -8
- package/dist/context/context-request-scope.js +0 -29
- package/dist/context/context-request-scope.js.map +0 -1
- package/dist/context/index.d.ts +0 -2
- package/dist/context/index.js +0 -9
- package/dist/context/index.js.map +0 -1
- package/dist/datastore/context.d.ts +0 -36
- package/dist/datastore/context.js +0 -27
- package/dist/datastore/context.js.map +0 -1
- package/dist/datastore/datastore.provider.d.ts +0 -8
- package/dist/datastore/datastore.provider.js +0 -30
- package/dist/datastore/datastore.provider.js.map +0 -1
- package/dist/datastore/filters.d.ts +0 -19
- package/dist/datastore/filters.js +0 -27
- package/dist/datastore/filters.js.map +0 -1
- package/dist/datastore/loader.d.ts +0 -50
- package/dist/datastore/loader.js +0 -147
- package/dist/datastore/loader.js.map +0 -1
- package/dist/datastore/node-datastore-session.d.ts +0 -17
- package/dist/datastore/node-datastore-session.js +0 -87
- package/dist/datastore/node-datastore-session.js.map +0 -1
- package/dist/datastore/repository.d.ts +0 -45
- package/dist/datastore/repository.js +0 -150
- package/dist/datastore/repository.js.map +0 -1
- package/dist/datastore/transactional.d.ts +0 -4
- package/dist/datastore/transactional.js +0 -13
- package/dist/datastore/transactional.js.map +0 -1
- package/dist/error/NonFatalError.d.ts +0 -3
- package/dist/error/NonFatalError.js +0 -11
- package/dist/error/NonFatalError.js.map +0 -1
- package/dist/filter.d.ts +0 -5
- package/dist/filter.js +0 -40
- package/dist/filter.js.map +0 -1
- package/dist/gcloud/logging.d.ts +0 -1
- package/dist/gcloud/logging.js +0 -5
- package/dist/gcloud/logging.js.map +0 -1
- package/dist/gcloud/storage.provider.d.ts +0 -12
- package/dist/gcloud/storage.provider.js +0 -41
- package/dist/gcloud/storage.provider.js.map +0 -1
- package/dist/gcloud/tasks.d.ts +0 -10
- package/dist/gcloud/tasks.js +0 -68
- package/dist/gcloud/tasks.js.map +0 -1
- package/dist/graphql/GraphQLMiddleware.d.ts +0 -0
- package/dist/graphql/GraphQLMiddleware.js +0 -2
- package/dist/graphql/GraphQLMiddleware.js.map +0 -1
- package/dist/index.d.ts +0 -28
- package/dist/index.js +0 -65
- package/dist/index.js.map +0 -1
- package/dist/logging/index.d.ts +0 -1
- package/dist/logging/index.js +0 -8
- package/dist/logging/index.js.map +0 -1
- package/dist/logging/logging-internal.d.ts +0 -2
- package/dist/logging/logging-internal.js +0 -20
- package/dist/logging/logging-internal.js.map +0 -1
- package/dist/logging/logging-request-scope.d.ts +0 -15
- package/dist/logging/logging-request-scope.js +0 -39
- package/dist/logging/logging-request-scope.js.map +0 -1
- package/dist/logging/logging.d.ts +0 -34
- package/dist/logging/logging.js +0 -55
- package/dist/logging/logging.js.map +0 -1
- package/dist/mail/gmail/gmail.configurer.d.ts +0 -15
- package/dist/mail/gmail/gmail.configurer.js +0 -59
- package/dist/mail/gmail/gmail.configurer.js.map +0 -1
- package/dist/mail/gmail/gmail.controller.d.ts +0 -9
- package/dist/mail/gmail/gmail.controller.js +0 -62
- package/dist/mail/gmail/gmail.controller.js.map +0 -1
- package/dist/mail/gmail/gmail.sender.d.ts +0 -12
- package/dist/mail/gmail/gmail.sender.js +0 -62
- package/dist/mail/gmail/gmail.sender.js.map +0 -1
- package/dist/mail/gmail/stored.credentials.repository.d.ts +0 -12
- package/dist/mail/gmail/stored.credentials.repository.js +0 -23
- package/dist/mail/gmail/stored.credentials.repository.js.map +0 -1
- package/dist/mail/mail-logging.sender.d.ts +0 -9
- package/dist/mail/mail-logging.sender.js +0 -42
- package/dist/mail/mail-logging.sender.js.map +0 -1
- package/dist/mail/mail-subject.sender.d.ts +0 -12
- package/dist/mail/mail-subject.sender.js +0 -33
- package/dist/mail/mail-subject.sender.js.map +0 -1
- package/dist/mail/mail-whitelist.sender.d.ts +0 -14
- package/dist/mail/mail-whitelist.sender.js +0 -59
- package/dist/mail/mail-whitelist.sender.js.map +0 -1
- package/dist/mail/mail.diverter.d.ts +0 -13
- package/dist/mail/mail.diverter.js +0 -65
- package/dist/mail/mail.diverter.js.map +0 -1
- package/dist/mail/mail.sender.d.ts +0 -6
- package/dist/mail/mail.sender.js +0 -5
- package/dist/mail/mail.sender.js.map +0 -1
- package/dist/mail/smtp/smtp.sender.d.ts +0 -10
- package/dist/mail/smtp/smtp.sender.js +0 -65
- package/dist/mail/smtp/smtp.sender.js.map +0 -1
- package/dist/mail-templates/base.d.ts +0 -2
- package/dist/mail-templates/base.js +0 -328
- package/dist/mail-templates/base.js.map +0 -1
- package/dist/mail-templates/invite.d.ts +0 -1
- package/dist/mail-templates/invite.js +0 -19
- package/dist/mail-templates/invite.js.map +0 -1
- package/dist/module.d.ts +0 -16
- package/dist/module.js +0 -136
- package/dist/module.js.map +0 -1
- package/dist/request-scope/index.d.ts +0 -2
- package/dist/request-scope/index.js +0 -9
- package/dist/request-scope/index.js.map +0 -1
- package/dist/request-scope/request-scope-interceptor.d.ts +0 -5
- package/dist/request-scope/request-scope-interceptor.js +0 -3
- package/dist/request-scope/request-scope-interceptor.js.map +0 -1
- package/dist/request-scope/request-scope.d.ts +0 -12
- package/dist/request-scope/request-scope.js +0 -79
- package/dist/request-scope/request-scope.js.map +0 -1
- package/dist/request-scope/request-scope.middleware.d.ts +0 -15
- package/dist/request-scope/request-scope.middleware.js +0 -53
- package/dist/request-scope/request-scope.middleware.js.map +0 -1
- package/dist/search/search.service.d.ts +0 -52
- package/dist/search/search.service.js +0 -90
- package/dist/search/search.service.js.map +0 -1
- package/dist/search/searchable.repository.d.ts +0 -36
- package/dist/search/searchable.repository.js +0 -95
- package/dist/search/searchable.repository.js.map +0 -1
- package/dist/types.d.ts +0 -3
- package/dist/types.js +0 -9
- package/dist/types.js.map +0 -1
- package/dist/util/arrays.d.ts +0 -1
- package/dist/util/arrays.js +0 -10
- package/dist/util/arrays.js.map +0 -1
- package/dist/util/guards.d.ts +0 -1
- package/dist/util/guards.js +0 -7
- package/dist/util/guards.js.map +0 -1
- package/dist/util/index.d.ts +0 -1
- package/dist/util/index.js +0 -5
- package/dist/util/index.js.map +0 -1
- package/dist/util/nestjs.d.ts +0 -9
- package/dist/util/nestjs.js +0 -9
- package/dist/util/nestjs.js.map +0 -1
- package/dist/util/types.d.ts +0 -4
- package/dist/util/types.js +0 -8
- package/dist/util/types.js.map +0 -1
- package/dist/validator.d.ts +0 -1
- package/dist/validator.js +0 -5
- package/dist/validator.js.map +0 -1
- package/mondomob-gae-node-nestjs-11.0.2-alpha.tgz +0 -0
- package/mondomob-gae-node-nestjs-11.0.2-alpha1.tgz +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
## 11.0.2 (2025-08-06)
|
|
2
|
-
|
|
3
|
-
Updating @node-saml/passport-saml from v4 to v5
|
|
4
|
-
- not a breaking change.
|
|
5
|
-
|
|
6
|
-
Updating various libs with minor version bumps only.
|
|
7
|
-
|
|
8
|
-
Removal of `dsui`
|
|
9
|
-
- dsui is an outdated Datastore UI for local development only
|
|
10
|
-
- removed code that attempts to start and stop dsui
|
|
11
|
-
- developers who still want to use this should handle the start/stop in their own projects
|
|
12
|
-
|
|
13
|
-
|
|
14
1
|
## 11.0.1 (2025-02-02)
|
|
15
2
|
|
|
16
3
|
Updating minor versions for nestjs, express, express-session.
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mondomob/gae-node-nestjs",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.0.0-alpha-2",
|
|
4
4
|
"description": "Google App Engine datastore repositories and graphql setup with nestjs",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
"license": "MIT",
|
|
24
24
|
"homepage": "https://github.com/mondo-mob/gae-node-nestjs",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@apollo/server": "4.
|
|
27
|
-
"@google-cloud/datastore": "9.1
|
|
26
|
+
"@apollo/server": "4.13.0",
|
|
27
|
+
"@google-cloud/datastore": "9.2.1",
|
|
28
28
|
"@google-cloud/logging-bunyan": "5.1.0",
|
|
29
|
-
"@google-cloud/storage": "7.
|
|
29
|
+
"@google-cloud/storage": "7.19.0",
|
|
30
30
|
"@google-cloud/tasks": "4.1.0",
|
|
31
31
|
"@google-cloud/trace-agent": "7.1.2",
|
|
32
32
|
"@node-saml/passport-saml": "5.1.0",
|
|
@@ -62,18 +62,18 @@
|
|
|
62
62
|
"webpack": "5.94.0"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
|
-
"@nestjs/common": "^10.4.
|
|
66
|
-
"@nestjs/core": "^10.4.
|
|
65
|
+
"@nestjs/common": "^10.4.22",
|
|
66
|
+
"@nestjs/core": "^10.4.22",
|
|
67
67
|
"@nestjs/graphql": "^12.2.2",
|
|
68
|
-
"@nestjs/platform-express": "^10.4.
|
|
69
|
-
"express": ">= 4.
|
|
68
|
+
"@nestjs/platform-express": "^10.4.22",
|
|
69
|
+
"express": ">= 4.22.0",
|
|
70
70
|
"rxjs": "7.8.1"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
|
-
"@nestjs/common": "10.4.
|
|
74
|
-
"@nestjs/core": "10.4.
|
|
73
|
+
"@nestjs/common": "10.4.22",
|
|
74
|
+
"@nestjs/core": "10.4.22",
|
|
75
75
|
"@nestjs/graphql": "12.2.2",
|
|
76
|
-
"@nestjs/platform-express": "10.4.
|
|
76
|
+
"@nestjs/platform-express": "10.4.22",
|
|
77
77
|
"@types/bcryptjs": "2.4.6",
|
|
78
78
|
"@types/bunyan": "1.8.11",
|
|
79
79
|
"@types/cls-hooked": "4.3.8",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"@types/passport-local": "1.0.38",
|
|
91
91
|
"@types/uuid": "8.3.4",
|
|
92
92
|
"chokidar": "3.6.0",
|
|
93
|
-
"express": "4.
|
|
93
|
+
"express": "4.22.1",
|
|
94
94
|
"jest": "29.7.0",
|
|
95
95
|
"prettier": "2.8.8",
|
|
96
96
|
"rxjs": "7.8.1",
|
package/server-start.js
CHANGED
|
@@ -21,6 +21,7 @@ const componentColors = {
|
|
|
21
21
|
server: colors.blue,
|
|
22
22
|
webpack: colors.magenta,
|
|
23
23
|
datastore: colors.cyan,
|
|
24
|
+
dsui: colors.green,
|
|
24
25
|
};
|
|
25
26
|
|
|
26
27
|
class BunyanStream {
|
|
@@ -45,15 +46,17 @@ const { buildEvents, stopWebpack } = setupWebpack(logger);
|
|
|
45
46
|
const { stopServer, startServer } = setupServer(logger, loggingStream, buildEvents);
|
|
46
47
|
|
|
47
48
|
const { stopDatastore, startDatastore } = setupDatastore(logger, buildEvents);
|
|
49
|
+
const { startDsui, stopDsui } = setupDsui(logger);
|
|
48
50
|
|
|
49
51
|
buildEvents.once('reload', startServer);
|
|
50
52
|
startDatastore();
|
|
53
|
+
startDsui();
|
|
51
54
|
|
|
52
55
|
// Handle process stop
|
|
53
56
|
process.on('SIGINT', async function () {
|
|
54
57
|
logger.info('Caught interrupt signal');
|
|
55
58
|
|
|
56
|
-
await Promise.all([stopWebpack(), stopDatastore(), stopServer()]);
|
|
59
|
+
await Promise.all([stopWebpack(), stopDatastore(), stopDsui(), stopServer()]);
|
|
57
60
|
|
|
58
61
|
logger.info('Shutting down');
|
|
59
62
|
process.exit();
|
|
@@ -229,6 +232,74 @@ function setupServer(logger, loggingStream, buildEvents) {
|
|
|
229
232
|
};
|
|
230
233
|
}
|
|
231
234
|
|
|
235
|
+
function setupDsui(logger) {
|
|
236
|
+
const dsuiLogger = logger.child({ component: 'dsui' });
|
|
237
|
+
let dsui;
|
|
238
|
+
const startDsui = () => {
|
|
239
|
+
// poll the status URL until the datastore emulator is ready
|
|
240
|
+
dsuiLogger.info('Waiting for Datastore emulator to start');
|
|
241
|
+
const timeout = setInterval(() => {
|
|
242
|
+
let body = '';
|
|
243
|
+
http.get(
|
|
244
|
+
{
|
|
245
|
+
hostname: '127.0.0.1',
|
|
246
|
+
port: DATASTORE_PORT,
|
|
247
|
+
path: '/',
|
|
248
|
+
agent: false,
|
|
249
|
+
},
|
|
250
|
+
res => {
|
|
251
|
+
res.on('data', data => {
|
|
252
|
+
body += data;
|
|
253
|
+
});
|
|
254
|
+
res.on('end', () => {
|
|
255
|
+
if (res.statusCode == 200) {
|
|
256
|
+
dsuiLogger.info('Datastore emulator is ready, starting DSUI');
|
|
257
|
+
clearInterval(timeout);
|
|
258
|
+
const gcloud = spawn('gcloud', ['beta', 'emulators', 'datastore', 'env-init', '--format=json']);
|
|
259
|
+
gcloud.stdout.on('data', data => {
|
|
260
|
+
const datastoreConfig = JSON.parse(data);
|
|
261
|
+
_.forEach(datastoreConfig, (value, key) => {
|
|
262
|
+
process.env[key] = value;
|
|
263
|
+
});
|
|
264
|
+
});
|
|
265
|
+
|
|
266
|
+
gcloud.once('close', () => {
|
|
267
|
+
dsui = spawn('npm', ['run', 'dsui']);
|
|
268
|
+
dsui.stdout.on('data', dsuiData => {
|
|
269
|
+
const string = dsuiData.toString('utf8');
|
|
270
|
+
dsuiLogger.info(string);
|
|
271
|
+
});
|
|
272
|
+
|
|
273
|
+
dsui.stderr.on('data', dsuiData => {
|
|
274
|
+
const string = dsuiData.toString('utf8');
|
|
275
|
+
dsuiLogger.error(string);
|
|
276
|
+
});
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
});
|
|
280
|
+
},
|
|
281
|
+
);
|
|
282
|
+
}, 2000);
|
|
283
|
+
};
|
|
284
|
+
|
|
285
|
+
const stopDsui = () => {
|
|
286
|
+
return new Promise(resolve => {
|
|
287
|
+
if (dsui) {
|
|
288
|
+
dsuiLogger.info('Killing DSUI');
|
|
289
|
+
dsui.kill('SIGINT');
|
|
290
|
+
dsui.once('close', () => {
|
|
291
|
+
logger.info('DSUI successfully shutdown');
|
|
292
|
+
resolve();
|
|
293
|
+
});
|
|
294
|
+
} else {
|
|
295
|
+
resolve();
|
|
296
|
+
}
|
|
297
|
+
});
|
|
298
|
+
};
|
|
299
|
+
|
|
300
|
+
return { startDsui, stopDsui };
|
|
301
|
+
}
|
|
302
|
+
|
|
232
303
|
function setupDatastore(logger, buildEvents) {
|
|
233
304
|
const datastoreLogger = logger.child({
|
|
234
305
|
component: 'datastore',
|
package/dist/_test/mocks.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Configuration, Context, MailSender } from '..';
|
|
2
|
-
import { Options } from 'nodemailer/lib/mailer';
|
|
3
|
-
export declare const testConfiguration: (overrides?: Partial<Configuration>) => Configuration;
|
|
4
|
-
export declare const mockContext: () => Context<import("..").IUser>;
|
|
5
|
-
export declare class MockMailSender implements MailSender {
|
|
6
|
-
send(context: Context, mailOptions: Options): Promise<void>;
|
|
7
|
-
}
|
|
8
|
-
export declare const isMock: (obj: any) => boolean;
|
|
9
|
-
export declare const partialInstance: <T>(props?: Partial<T>) => T;
|
package/dist/_test/mocks.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.partialInstance = exports.isMock = exports.MockMailSender = exports.mockContext = exports.testConfiguration = void 0;
|
|
4
|
-
const ts_mockito_1 = require("ts-mockito");
|
|
5
|
-
const loader_1 = require("../datastore/loader");
|
|
6
|
-
const testConfiguration = (overrides) => (Object.assign({ auth: {}, bucket: 'required but not important for test', environment: 'required but not important for test', gmailUser: 'required but not important for test', host: 'required but not important for test', location: 'required but not important for test', projectId: 'required but not important for test', systemSecret: Buffer.from([]), isDevelopment() {
|
|
7
|
-
return true;
|
|
8
|
-
} }, overrides));
|
|
9
|
-
exports.testConfiguration = testConfiguration;
|
|
10
|
-
const mockContext = () => {
|
|
11
|
-
const datastoreLoader = (0, ts_mockito_1.mock)(loader_1.DatastoreLoader);
|
|
12
|
-
const context = {
|
|
13
|
-
datastore: (0, ts_mockito_1.instance)(datastoreLoader),
|
|
14
|
-
};
|
|
15
|
-
(0, ts_mockito_1.when)(datastoreLoader.inTransaction((0, ts_mockito_1.anyFunction)())).thenCall((cb) => cb(context));
|
|
16
|
-
return context;
|
|
17
|
-
};
|
|
18
|
-
exports.mockContext = mockContext;
|
|
19
|
-
class MockMailSender {
|
|
20
|
-
async send(context, mailOptions) { }
|
|
21
|
-
}
|
|
22
|
-
exports.MockMailSender = MockMailSender;
|
|
23
|
-
const isMock = (obj) => '__tsmockitoMocker' in obj;
|
|
24
|
-
exports.isMock = isMock;
|
|
25
|
-
const partialInstance = (props = {}) => (Object.assign({}, props));
|
|
26
|
-
exports.partialInstance = partialInstance;
|
|
27
|
-
//# sourceMappingURL=mocks.js.map
|
package/dist/_test/mocks.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mocks.js","sourceRoot":"","sources":["../../src/_test/mocks.ts"],"names":[],"mappings":";;;AAAA,2CAA+D;AAC/D,gDAAsD;AAI/C,MAAM,iBAAiB,GAAG,CAAC,SAAkC,EAAiB,EAAE,CAAC,iBACtF,IAAI,EAAE,EAAE,EACR,MAAM,EAAE,qCAAqC,EAC7C,WAAW,EAAE,qCAAqC,EAClD,SAAS,EAAE,qCAAqC,EAChD,IAAI,EAAE,qCAAqC,EAC3C,QAAQ,EAAE,qCAAqC,EAC/C,SAAS,EAAE,qCAAqC,EAChD,YAAY,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,EAC7B,aAAa;QACX,OAAO,IAAI,CAAC;IACd,CAAC,IACE,SAAS,EACZ,CAAC;AAbU,QAAA,iBAAiB,qBAa3B;AAEI,MAAM,WAAW,GAAG,GAAG,EAAE;IAC9B,MAAM,eAAe,GAAG,IAAA,iBAAI,EAAC,wBAAe,CAAC,CAAC;IAE9C,MAAM,OAAO,GAAG;QACd,SAAS,EAAE,IAAA,qBAAQ,EAAC,eAAe,CAAC;KAC1B,CAAC;IAEb,IAAA,iBAAI,EAAC,eAAe,CAAC,aAAa,CAAC,IAAA,wBAAW,GAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAO,EAAE,EAAE,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAEtF,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAVW,QAAA,WAAW,eAUtB;AAEF,MAAa,cAAc;IACzB,KAAK,CAAC,IAAI,CAAC,OAAgB,EAAE,WAAoB,IAAkB,CAAC;CACrE;AAFD,wCAEC;AAEM,MAAM,MAAM,GAAG,CAAC,GAAQ,EAAE,EAAE,CAAC,mBAAmB,IAAI,GAAG,CAAC;AAAlD,QAAA,MAAM,UAA4C;AAaxD,MAAM,eAAe,GAAG,CAAI,QAAoB,EAAE,EAAK,EAAE,CAAC,CAAC,kBAAK,KAAK,CAAQ,CAAA,CAAC;AAAxE,QAAA,eAAe,mBAAyD"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.interceptorTest = void 0;
|
|
4
|
-
const ts_mockito_1 = require("ts-mockito");
|
|
5
|
-
const request_scope_middleware_1 = require("../request-scope/request-scope.middleware");
|
|
6
|
-
const mocks_1 = require("./mocks");
|
|
7
|
-
const configProvider = (0, mocks_1.partialInstance)({ requestScope: { enabled: true } });
|
|
8
|
-
const interceptorTest = (interceptor, req, testAssertions) => {
|
|
9
|
-
const request = (0, mocks_1.isMock)(req) ? (0, ts_mockito_1.instance)(req) : req;
|
|
10
|
-
let nextCalled = false;
|
|
11
|
-
new request_scope_middleware_1.RequestScopeMiddleware(configProvider, [interceptor]).use(request, (0, ts_mockito_1.instance)((0, ts_mockito_1.mock)()), () => {
|
|
12
|
-
nextCalled = true;
|
|
13
|
-
testAssertions();
|
|
14
|
-
});
|
|
15
|
-
expect(nextCalled).toBe(true);
|
|
16
|
-
};
|
|
17
|
-
exports.interceptorTest = interceptorTest;
|
|
18
|
-
//# sourceMappingURL=request-scope-test-utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"request-scope-test-utils.js","sourceRoot":"","sources":["../../src/_test/request-scope-test-utils.ts"],"names":[],"mappings":";;;AAAA,2CAA4C;AAE5C,wFAAmF;AACnF,mCAAkD;AAIlD,MAAM,cAAc,GAAG,IAAA,uBAAe,EAAgB,EAAE,YAAY,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;AAEpF,MAAM,eAAe,GAAG,CAC7B,WAAoC,EACpC,GAAM,EACN,cAA0B,EAC1B,EAAE;IACF,MAAM,OAAO,GAAG,IAAA,cAAM,EAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAA,qBAAQ,EAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;IAClD,IAAI,UAAU,GAAG,KAAK,CAAC;IACvB,IAAI,iDAAsB,CAAC,cAAc,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,IAAA,qBAAQ,EAAC,IAAA,iBAAI,GAAY,CAAC,EAAE,GAAG,EAAE;QACtG,UAAU,GAAG,IAAI,CAAC;QAClB,cAAc,EAAE,CAAC;IACnB,CAAC,CAAC,CAAC;IACH,MAAM,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAChC,CAAC,CAAC;AAZW,QAAA,eAAe,mBAY1B"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AuthUser = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const graphql_1 = require("@nestjs/graphql");
|
|
6
|
-
let Credentials = class Credentials {
|
|
7
|
-
};
|
|
8
|
-
tslib_1.__decorate([
|
|
9
|
-
(0, graphql_1.Field)(),
|
|
10
|
-
tslib_1.__metadata("design:type", String)
|
|
11
|
-
], Credentials.prototype, "username", void 0);
|
|
12
|
-
tslib_1.__decorate([
|
|
13
|
-
(0, graphql_1.Field)(),
|
|
14
|
-
tslib_1.__metadata("design:type", String)
|
|
15
|
-
], Credentials.prototype, "type", void 0);
|
|
16
|
-
Credentials = tslib_1.__decorate([
|
|
17
|
-
(0, graphql_1.ObjectType)()
|
|
18
|
-
], Credentials);
|
|
19
|
-
let AuthUser = class AuthUser {
|
|
20
|
-
};
|
|
21
|
-
exports.AuthUser = AuthUser;
|
|
22
|
-
tslib_1.__decorate([
|
|
23
|
-
(0, graphql_1.Field)(),
|
|
24
|
-
tslib_1.__metadata("design:type", Credentials)
|
|
25
|
-
], AuthUser.prototype, "credentials", void 0);
|
|
26
|
-
tslib_1.__decorate([
|
|
27
|
-
(0, graphql_1.Field)(() => [String]),
|
|
28
|
-
tslib_1.__metadata("design:type", Array)
|
|
29
|
-
], AuthUser.prototype, "roles", void 0);
|
|
30
|
-
exports.AuthUser = AuthUser = tslib_1.__decorate([
|
|
31
|
-
(0, graphql_1.ObjectType)()
|
|
32
|
-
], AuthUser);
|
|
33
|
-
//# sourceMappingURL=auth-user.model.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth-user.model.js","sourceRoot":"","sources":["../../src/auth/auth-user.model.ts"],"names":[],"mappings":";;;;AAAA,6CAAoD;AAGpD,IAAM,WAAW,GAAjB,MAAM,WAAW;CAKhB,CAAA;AAHC;IADC,IAAA,eAAK,GAAE;;6CACS;AAEjB;IADC,IAAA,eAAK,GAAE;;yCACK;AAJT,WAAW;IADhB,IAAA,oBAAU,GAAE;GACP,WAAW,CAKhB;AAGM,IAAM,QAAQ,GAAd,MAAM,QAAQ;CAKpB,CAAA;AALY,4BAAQ;AAEnB;IADC,IAAA,eAAK,GAAE;sCACM,WAAW;6CAAC;AAE1B;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,CAAC,MAAO,CAAC,CAAC;;uCACE;mBAJd,QAAQ;IADpB,IAAA,oBAAU,GAAE;GACA,QAAQ,CAKpB"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Request } from 'express';
|
|
2
|
-
export declare const AUTH_CALLBACKS = "AuthCallbacks";
|
|
3
|
-
export interface AuthCallbacks {
|
|
4
|
-
buildUserRolesList?(authType: string, profileData: any): string[];
|
|
5
|
-
buildUserPropertiesObject?(authType: string, profileData: any): any;
|
|
6
|
-
buildAuthenticationOptions?(authType: string, req: Request, defaultAuthenticateOptions: any): any;
|
|
7
|
-
getLoginIdentifier?(authType: string, authToken: any): string;
|
|
8
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.callbacks.js","sourceRoot":"","sources":["../../src/auth/auth.callbacks.ts"],"names":[],"mappings":";;;AAEa,QAAA,cAAc,GAAG,eAAe,CAAC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { Request } from 'express';
|
|
2
|
-
import { Profile } from 'passport-auth0';
|
|
3
|
-
import { IVerifyOptions } from 'passport-local';
|
|
4
|
-
import { Configuration } from '../configuration';
|
|
5
|
-
import { IUser } from '../datastore/context';
|
|
6
|
-
import { DatastoreProvider } from '../datastore/datastore.provider';
|
|
7
|
-
import { AuthCallbacks } from './auth.callbacks';
|
|
8
|
-
import { AuthService } from './auth.service';
|
|
9
|
-
export declare class AuthConfigurer {
|
|
10
|
-
private readonly configuration;
|
|
11
|
-
private readonly authService;
|
|
12
|
-
private readonly authCallbacks;
|
|
13
|
-
private readonly datastore;
|
|
14
|
-
private readonly logger;
|
|
15
|
-
constructor(datastoreProvider: DatastoreProvider, configuration: Configuration, authService: AuthService, authCallbacks: AuthCallbacks);
|
|
16
|
-
private init;
|
|
17
|
-
beginAuthenticateGoogle(): any;
|
|
18
|
-
completeAuthenticateGoogle(): any;
|
|
19
|
-
beginAuthenticateSaml(): any;
|
|
20
|
-
completeAuthenticateSaml(): any;
|
|
21
|
-
beginAuthenticateOidc(): any;
|
|
22
|
-
completeAuthenticateOidc(): any;
|
|
23
|
-
beginAuthenticateAuth0(req: Request): any;
|
|
24
|
-
completeAuthenticateAuth0(req: Request): any;
|
|
25
|
-
getSignoutUrlAuth0(): string;
|
|
26
|
-
authenticateLocal(): any;
|
|
27
|
-
authenticateFake(): any;
|
|
28
|
-
validate: (username: string, password: string, done: (error: Error | null, user: IUser | false) => void) => Promise<void>;
|
|
29
|
-
validateFakeLogin: (req: Request, username: string, password: string, done: (error: Error | null, user: IUser | false) => void) => Promise<void>;
|
|
30
|
-
validateGmail: (accessToken: string, refreshToken: string, profile: object, done: (error: Error | null, user: IUser | false) => void) => Promise<void>;
|
|
31
|
-
validateSaml: (profile: any, done: any) => Promise<void>;
|
|
32
|
-
validateOidc: (_issuer: any, _sub: any, profile: any, _accessToken: any, _refreshToken: any, done: (error: Error | null, user: IUser | false) => void) => Promise<void>;
|
|
33
|
-
validateAuth0: (accessToken: string, refreshToken: string, extraParams: any, profile: Profile, done: (error: Error | null, user: IUser | false) => void) => Promise<void>;
|
|
34
|
-
validateAuth: (done: (error: Error | null, user: IUser | false, options?: IVerifyOptions) => void, auth: () => Promise<IUser>) => Promise<void>;
|
|
35
|
-
}
|
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AuthConfigurer = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const common_1 = require("@nestjs/common");
|
|
6
|
-
const passport_saml_1 = require("@node-saml/passport-saml");
|
|
7
|
-
const jsonwebtoken_1 = require("jsonwebtoken");
|
|
8
|
-
const lodash_1 = require("lodash");
|
|
9
|
-
const passport = require("passport");
|
|
10
|
-
const passport_auth0_1 = require("passport-auth0");
|
|
11
|
-
const passport_google_oauth20_1 = require("passport-google-oauth20");
|
|
12
|
-
const passport_local_1 = require("passport-local");
|
|
13
|
-
const passport_openidconnect_1 = require("passport-openidconnect");
|
|
14
|
-
const context_1 = require("../datastore/context");
|
|
15
|
-
const datastore_provider_1 = require("../datastore/datastore.provider");
|
|
16
|
-
const logging_1 = require("../logging");
|
|
17
|
-
const auth_callbacks_1 = require("./auth.callbacks");
|
|
18
|
-
const auth_service_1 = require("./auth.service");
|
|
19
|
-
const user_service_1 = require("./user.service");
|
|
20
|
-
const GOOGLE_SIGNIN = 'google';
|
|
21
|
-
const SAML_SIGNIN = 'saml';
|
|
22
|
-
const AUTH0_SIGNIN = 'auth0';
|
|
23
|
-
const OIDC_SIGNIN = 'oidc';
|
|
24
|
-
const LOCAL_SIGNIN = 'local-signin';
|
|
25
|
-
const FAKE_SIGNIN = 'fake-signin';
|
|
26
|
-
const DEFAULT_FAILURE_REDIRECT = '/';
|
|
27
|
-
let AuthConfigurer = class AuthConfigurer {
|
|
28
|
-
constructor(datastoreProvider, configuration, authService, authCallbacks) {
|
|
29
|
-
this.configuration = configuration;
|
|
30
|
-
this.authService = authService;
|
|
31
|
-
this.authCallbacks = authCallbacks;
|
|
32
|
-
this.validate = async (username, password, done) => this.validateAuth(done, () => this.authService.validateUser((0, context_1.newContext)(this.datastore), username, password));
|
|
33
|
-
this.validateFakeLogin = async (req, username, password, done) => this.validateAuth(done, () => this.authService.validateFakeLogin((0, context_1.newContext)(this.datastore), req.headers['x-fake-secret'], username, (0, lodash_1.get)(req, 'body.name', ''), (0, lodash_1.get)(req, 'body.roles', []), (0, lodash_1.get)(req, 'body.orgId', ''), (0, lodash_1.get)(req, 'body.props', {})));
|
|
34
|
-
this.validateGmail = async (accessToken, refreshToken, profile, done) => this.validateAuth(done, () => this.authService.validateUserGoogle((0, context_1.newContext)(this.datastore), profile));
|
|
35
|
-
this.validateSaml = (profile, done) => this.validateAuth(done, () => this.authService.validateUserSaml((0, context_1.newContext)(this.datastore), profile));
|
|
36
|
-
this.validateOidc = (_issuer, _sub, profile, _accessToken, _refreshToken, done) => this.validateAuth(done, () => this.authService.validateUserOidc((0, context_1.newContext)(this.datastore), profile, !!this.configuration.auth.oidc.replaceAuth, this.configuration.auth.oidc.newUserRoles));
|
|
37
|
-
this.validateAuth0 = (accessToken, refreshToken, extraParams, profile, done) => this.validateAuth(done, () => {
|
|
38
|
-
const decoded = (0, jsonwebtoken_1.decode)(extraParams.id_token);
|
|
39
|
-
const { email, name } = decoded;
|
|
40
|
-
const normalisedEmail = (0, user_service_1.normaliseEmail)(email);
|
|
41
|
-
const namespace = this.configuration.auth.auth0.namespace;
|
|
42
|
-
const roles = decoded[`${namespace}roles`];
|
|
43
|
-
const orgId = decoded[`${namespace}orgId`];
|
|
44
|
-
let id = normalisedEmail;
|
|
45
|
-
if (this.authCallbacks && this.authCallbacks.getLoginIdentifier) {
|
|
46
|
-
id = this.authCallbacks.getLoginIdentifier(AUTH0_SIGNIN, decoded);
|
|
47
|
-
}
|
|
48
|
-
let props = decoded[`${namespace}props`];
|
|
49
|
-
if (this.authCallbacks && this.authCallbacks.buildUserPropertiesObject) {
|
|
50
|
-
props = this.authCallbacks.buildUserPropertiesObject(AUTH0_SIGNIN, decoded);
|
|
51
|
-
}
|
|
52
|
-
if (!roles || !roles.length) {
|
|
53
|
-
this.logger.warn(`No roles were provided by auth0 for ${normalisedEmail}`);
|
|
54
|
-
}
|
|
55
|
-
return this.authService.validateUserAuth0((0, context_1.newContext)(this.datastore), id, normalisedEmail, name, orgId, roles, props);
|
|
56
|
-
});
|
|
57
|
-
this.validateAuth = async (done, auth) => {
|
|
58
|
-
try {
|
|
59
|
-
const user = await auth();
|
|
60
|
-
if (!user) {
|
|
61
|
-
return done(null, false, new common_1.UnauthorizedException());
|
|
62
|
-
}
|
|
63
|
-
done(null, user);
|
|
64
|
-
}
|
|
65
|
-
catch (ex) {
|
|
66
|
-
this.logger.error(ex);
|
|
67
|
-
if (ex instanceof auth_service_1.AuthenticationFailedException) {
|
|
68
|
-
done(null, false, ex);
|
|
69
|
-
}
|
|
70
|
-
else {
|
|
71
|
-
done(new common_1.UnauthorizedException(ex, 'Internal error'), false);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
this.datastore = datastoreProvider.datastore;
|
|
76
|
-
this.logger = (0, logging_1.createLogger)('auth');
|
|
77
|
-
this.init();
|
|
78
|
-
}
|
|
79
|
-
init() {
|
|
80
|
-
passport.serializeUser((user, done) => {
|
|
81
|
-
done(null, { id: user.id });
|
|
82
|
-
});
|
|
83
|
-
passport.deserializeUser(async (user, done) => {
|
|
84
|
-
done(null, { id: user.id });
|
|
85
|
-
});
|
|
86
|
-
if (this.configuration.auth.local && this.configuration.auth.local.enabled) {
|
|
87
|
-
passport.use(LOCAL_SIGNIN, new passport_local_1.Strategy({}, this.validate));
|
|
88
|
-
}
|
|
89
|
-
if (this.configuration.auth.fake && this.configuration.auth.fake.enabled) {
|
|
90
|
-
if (!this.configuration.isDevelopment()) {
|
|
91
|
-
if (!this.configuration.auth.fake.secret) {
|
|
92
|
-
throw new Error('Fake login must have secret configured in non-development environments');
|
|
93
|
-
}
|
|
94
|
-
this.logger.warn('Fake login is enabled');
|
|
95
|
-
}
|
|
96
|
-
passport.use(FAKE_SIGNIN, new passport_local_1.Strategy({ passReqToCallback: true }, this.validateFakeLogin));
|
|
97
|
-
}
|
|
98
|
-
if (this.configuration.auth.google && this.configuration.auth.google.enabled) {
|
|
99
|
-
passport.use(new passport_google_oauth20_1.Strategy({
|
|
100
|
-
clientID: this.configuration.auth.google.clientId,
|
|
101
|
-
clientSecret: this.configuration.auth.google.secret,
|
|
102
|
-
callbackURL: `${this.configuration.host}/auth/signin/google/callback`,
|
|
103
|
-
userProfileURL: 'https://www.googleapis.com/oauth2/v3/userinfo',
|
|
104
|
-
}, this.validateGmail));
|
|
105
|
-
}
|
|
106
|
-
if (this.configuration.auth.saml && this.configuration.auth.saml.enabled) {
|
|
107
|
-
passport.use(SAML_SIGNIN, new passport_saml_1.Strategy({
|
|
108
|
-
entryPoint: this.configuration.auth.saml.identityProviderUrl,
|
|
109
|
-
callbackUrl: `${this.configuration.host}/auth/signin/saml/acs`,
|
|
110
|
-
issuer: this.configuration.host,
|
|
111
|
-
audience: this.configuration.host,
|
|
112
|
-
acceptedClockSkewMs: 5000,
|
|
113
|
-
idpCert: this.configuration.auth.saml.cert,
|
|
114
|
-
wantAuthnResponseSigned: false,
|
|
115
|
-
}, this.validateSaml, () => undefined));
|
|
116
|
-
}
|
|
117
|
-
if (this.configuration.auth.auth0 && this.configuration.auth.auth0.enabled) {
|
|
118
|
-
passport.use(AUTH0_SIGNIN, new passport_auth0_1.Strategy({
|
|
119
|
-
domain: this.configuration.auth.auth0.domain,
|
|
120
|
-
clientID: this.configuration.auth.auth0.clientId,
|
|
121
|
-
clientSecret: this.configuration.auth.auth0.secret,
|
|
122
|
-
callbackURL: `${this.configuration.host}/auth/signin/auth0/callback`,
|
|
123
|
-
}, this.validateAuth0));
|
|
124
|
-
}
|
|
125
|
-
if (this.configuration.auth.oidc && this.configuration.auth.oidc.enabled) {
|
|
126
|
-
const { authUrl, clientId, enabled, issuer, secret, tokenUrl, userInfoUrl } = this.configuration.auth.oidc;
|
|
127
|
-
passport.use(OIDC_SIGNIN, new passport_openidconnect_1.Strategy({
|
|
128
|
-
issuer,
|
|
129
|
-
authorizationURL: authUrl,
|
|
130
|
-
tokenURL: tokenUrl,
|
|
131
|
-
userInfoURL: userInfoUrl,
|
|
132
|
-
clientID: clientId,
|
|
133
|
-
clientSecret: secret,
|
|
134
|
-
callbackURL: `${this.configuration.host}/auth/signin/oidc/callback`,
|
|
135
|
-
scope: 'profile email',
|
|
136
|
-
}, this.validateOidc));
|
|
137
|
-
this.logger.info(`Configured ${OIDC_SIGNIN} authentication strategy`);
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
beginAuthenticateGoogle() {
|
|
141
|
-
const options = {
|
|
142
|
-
scope: ['profile', 'email'],
|
|
143
|
-
};
|
|
144
|
-
return passport.authenticate(GOOGLE_SIGNIN, options);
|
|
145
|
-
}
|
|
146
|
-
completeAuthenticateGoogle() {
|
|
147
|
-
return passport.authenticate(GOOGLE_SIGNIN, {
|
|
148
|
-
failureRedirect: this.configuration.auth.google.failureRedirect || DEFAULT_FAILURE_REDIRECT,
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
beginAuthenticateSaml() {
|
|
152
|
-
return passport.authenticate(SAML_SIGNIN, {
|
|
153
|
-
failureRedirect: this.configuration.auth.saml.failureRedirect || DEFAULT_FAILURE_REDIRECT,
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
completeAuthenticateSaml() {
|
|
157
|
-
return passport.authenticate(SAML_SIGNIN, {
|
|
158
|
-
failureRedirect: this.configuration.auth.saml.failureRedirect || DEFAULT_FAILURE_REDIRECT,
|
|
159
|
-
});
|
|
160
|
-
}
|
|
161
|
-
beginAuthenticateOidc() {
|
|
162
|
-
return passport.authenticate(OIDC_SIGNIN, {
|
|
163
|
-
scope: ['openid', 'profile', 'email'],
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
completeAuthenticateOidc() {
|
|
167
|
-
return passport.authenticate(OIDC_SIGNIN, {
|
|
168
|
-
failureRedirect: this.configuration.auth.oidc.failureRedirect || DEFAULT_FAILURE_REDIRECT,
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
beginAuthenticateAuth0(req) {
|
|
172
|
-
const defaultOptions = {
|
|
173
|
-
scope: ['openid', 'email', 'profile'],
|
|
174
|
-
};
|
|
175
|
-
let options;
|
|
176
|
-
if (this.authCallbacks && this.authCallbacks.buildAuthenticationOptions) {
|
|
177
|
-
options = this.authCallbacks.buildAuthenticationOptions(AUTH0_SIGNIN, req, defaultOptions);
|
|
178
|
-
}
|
|
179
|
-
return passport.authenticate(AUTH0_SIGNIN, options || defaultOptions);
|
|
180
|
-
}
|
|
181
|
-
completeAuthenticateAuth0(req) {
|
|
182
|
-
const defaultOptions = {
|
|
183
|
-
failureRedirect: this.configuration.auth.auth0.failureRedirect || DEFAULT_FAILURE_REDIRECT,
|
|
184
|
-
};
|
|
185
|
-
let options;
|
|
186
|
-
if (this.authCallbacks && this.authCallbacks.buildAuthenticationOptions) {
|
|
187
|
-
options = this.authCallbacks.buildAuthenticationOptions(AUTH0_SIGNIN, req, defaultOptions);
|
|
188
|
-
}
|
|
189
|
-
return passport.authenticate(AUTH0_SIGNIN, options || defaultOptions);
|
|
190
|
-
}
|
|
191
|
-
getSignoutUrlAuth0() {
|
|
192
|
-
const clientId = this.configuration.auth.auth0.clientId;
|
|
193
|
-
const domain = this.configuration.auth.auth0.domain;
|
|
194
|
-
const host = this.configuration.host;
|
|
195
|
-
return `https://${domain}/v2/logout?client_id=${clientId}&returnTo=${host}`;
|
|
196
|
-
}
|
|
197
|
-
authenticateLocal() {
|
|
198
|
-
return passport.authenticate(LOCAL_SIGNIN, {});
|
|
199
|
-
}
|
|
200
|
-
authenticateFake() {
|
|
201
|
-
return passport.authenticate(FAKE_SIGNIN, {});
|
|
202
|
-
}
|
|
203
|
-
};
|
|
204
|
-
exports.AuthConfigurer = AuthConfigurer;
|
|
205
|
-
exports.AuthConfigurer = AuthConfigurer = tslib_1.__decorate([
|
|
206
|
-
(0, common_1.Injectable)(),
|
|
207
|
-
tslib_1.__param(1, (0, common_1.Inject)('Configuration')),
|
|
208
|
-
tslib_1.__param(3, (0, common_1.Optional)()),
|
|
209
|
-
tslib_1.__param(3, (0, common_1.Inject)(auth_callbacks_1.AUTH_CALLBACKS)),
|
|
210
|
-
tslib_1.__metadata("design:paramtypes", [datastore_provider_1.DatastoreProvider, Object, auth_service_1.AuthService, Object])
|
|
211
|
-
], AuthConfigurer);
|
|
212
|
-
//# sourceMappingURL=auth.configurer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.configurer.js","sourceRoot":"","sources":["../../src/auth/auth.configurer.ts"],"names":[],"mappings":";;;;AACA,2CAAqF;AACrF,4DAAoE;AAEpE,+CAAsC;AACtC,mCAA6B;AAC7B,qCAAqC;AACrC,mDAAoE;AACpE,qEAAqE;AACrE,mDAA2E;AAC3E,mEAAkE;AAElE,kDAAyD;AACzD,wEAAoE;AACpE,wCAAkD;AAClD,qDAAiE;AACjE,iDAA4E;AAC5E,iDAAgD;AAEhD,MAAM,aAAa,GAAG,QAAQ,CAAC;AAC/B,MAAM,WAAW,GAAG,MAAM,CAAC;AAC3B,MAAM,YAAY,GAAG,OAAO,CAAC;AAC7B,MAAM,WAAW,GAAG,MAAM,CAAC;AAC3B,MAAM,YAAY,GAAG,cAAc,CAAC;AACpC,MAAM,WAAW,GAAG,aAAa,CAAC;AAElC,MAAM,wBAAwB,GAAG,GAAG,CAAC;AAG9B,IAAM,cAAc,GAAp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rC,OAAO,WAAW,MAAM,wBAAwB,QAAQ,aAAa,IAAI,EAAE,CAAC;IAC9E,CAAC;IAED,iBAAiB;QACf,OAAO,QAAQ,CAAC,YAAY,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;IACjD,CAAC;IAED,gBAAgB;QACd,OAAO,QAAQ,CAAC,YAAY,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IAChD,CAAC;CA6GF,CAAA;AAjSY,wCAAc;yBAAd,cAAc;IAD1B,IAAA,mBAAU,GAAE;IAOR,mBAAA,IAAA,eAAM,EAAC,eAAe,CAAC,CAAA;IAEvB,mBAAA,IAAA,iBAAQ,GAAE,CAAA;IAAE,mBAAA,IAAA,eAAM,EAAC,+BAAc,CAAC,CAAA;6CAHhB,sCAAiB,UAEN,0BAAW;GAPhC,cAAc,CAiS1B"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Request, Response } from 'express';
|
|
2
|
-
import { Configuration, Context, InviteUserService } from '..';
|
|
3
|
-
import { AuthConfigurer } from './auth.configurer';
|
|
4
|
-
import { AuthListener } from './auth.listener';
|
|
5
|
-
export declare class AuthController {
|
|
6
|
-
private readonly authConfigurer;
|
|
7
|
-
private readonly inviteUserService;
|
|
8
|
-
private readonly configuration;
|
|
9
|
-
private readonly authListener;
|
|
10
|
-
private logger;
|
|
11
|
-
constructor(authConfigurer: AuthConfigurer, inviteUserService: InviteUserService, configuration: Configuration, authListener: AuthListener);
|
|
12
|
-
signIn(req: Request, res: Response, next: (err: Error) => void): void;
|
|
13
|
-
signInFake(req: Request, res: Response, next: (err: Error) => void): void;
|
|
14
|
-
activate(req: Request, res: Response, next: (err: Error) => void, context: Context): Promise<void>;
|
|
15
|
-
reInviteUser(req: Request, res: Response, next: (err: Error) => void, context: Context): Promise<void>;
|
|
16
|
-
signOutLocal(req: Request, res: Response, next: (err: Error) => void): void;
|
|
17
|
-
signOut(req: Request, res: Response, next: (err: Error) => void): void;
|
|
18
|
-
signInGoogle(req: Request, res: Response, next: () => void): void;
|
|
19
|
-
completeSignInGoogle(req: Request, res: Response): void;
|
|
20
|
-
signInSaml(req: Request, res: Response, next: () => void): void;
|
|
21
|
-
completeSignInSaml(req: Request, res: Response): void;
|
|
22
|
-
signInAuth0(req: Request, res: Response, next: () => void): void;
|
|
23
|
-
signOutAuth0(req: Request, res: Response): void;
|
|
24
|
-
completeSignInAuth0(req: Request, res: Response): void;
|
|
25
|
-
signInOidc(req: Request, res: Response, next: () => void): void;
|
|
26
|
-
completeSignInOidc(req: Request, res: Response): void;
|
|
27
|
-
}
|