@feathersjs/authentication 5.0.0-pre.1 → 5.0.0-pre.15
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/CHANGELOG.md +162 -0
- package/LICENSE +1 -1
- package/README.md +1 -1
- package/lib/core.d.ts +7 -0
- package/lib/core.js +70 -77
- package/lib/core.js.map +1 -1
- package/lib/hooks/authenticate.d.ts +2 -2
- package/lib/hooks/authenticate.js +11 -20
- package/lib/hooks/authenticate.js.map +1 -1
- package/lib/hooks/connection.d.ts +2 -2
- package/lib/hooks/connection.js +7 -17
- package/lib/hooks/connection.js.map +1 -1
- package/lib/hooks/event.d.ts +2 -2
- package/lib/hooks/event.js +5 -17
- package/lib/hooks/event.js.map +1 -1
- package/lib/index.d.ts +2 -4
- package/lib/index.js +3 -4
- package/lib/index.js.map +1 -1
- package/lib/jwt.d.ts +1 -1
- package/lib/jwt.js +95 -106
- package/lib/jwt.js.map +1 -1
- package/lib/service.d.ts +8 -8
- package/lib/service.js +54 -73
- package/lib/service.js.map +1 -1
- package/lib/strategy.d.ts +1 -1
- package/package.json +18 -19
- package/src/core.ts +13 -3
- package/src/hooks/authenticate.ts +7 -8
- package/src/hooks/connection.ts +9 -11
- package/src/hooks/event.ts +6 -6
- package/src/index.ts +2 -6
- package/src/jwt.ts +6 -3
- package/src/service.ts +13 -16
- package/src/strategy.ts +1 -1
package/lib/index.js
CHANGED
|
@@ -20,10 +20,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
20
20
|
};
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
22
|
exports.JWTStrategy = exports.AuthenticationService = exports.AuthenticationBaseStrategy = exports.AuthenticationBase = exports.authenticate = exports.hooks = void 0;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
exports.authenticate = authenticate;
|
|
23
|
+
exports.hooks = __importStar(require("./hooks"));
|
|
24
|
+
var hooks_1 = require("./hooks");
|
|
25
|
+
Object.defineProperty(exports, "authenticate", { enumerable: true, get: function () { return hooks_1.authenticate; } });
|
|
27
26
|
var core_1 = require("./core");
|
|
28
27
|
Object.defineProperty(exports, "AuthenticationBase", { enumerable: true, get: function () { return core_1.AuthenticationBase; } });
|
|
29
28
|
var strategy_1 = require("./strategy");
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAiC;AACjC,iCAAuC;AAA9B,qGAAA,YAAY,OAAA;AACrB,+BAMgB;AALd,0GAAA,kBAAkB,OAAA;AAMpB,uCAAwD;AAA/C,sHAAA,0BAA0B,OAAA;AACnC,qCAAkD;AAAzC,gHAAA,qBAAqB,OAAA;AAC9B,6BAAoC;AAA3B,kGAAA,WAAW,OAAA"}
|
package/lib/jwt.d.ts
CHANGED
package/lib/jwt.js
CHANGED
|
@@ -1,26 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
4
|
};
|
|
14
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
6
|
exports.JWTStrategy = void 0;
|
|
16
7
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
17
|
-
const debug_1 = __importDefault(require("debug"));
|
|
18
8
|
const omit_1 = __importDefault(require("lodash/omit"));
|
|
19
9
|
const errors_1 = require("@feathersjs/errors");
|
|
10
|
+
const commons_1 = require("@feathersjs/commons");
|
|
20
11
|
// @ts-ignore
|
|
21
12
|
const long_timeout_1 = __importDefault(require("long-timeout"));
|
|
22
13
|
const strategy_1 = require("./strategy");
|
|
23
|
-
const debug =
|
|
14
|
+
const debug = (0, commons_1.createDebug)('@feathersjs/authentication/jwt');
|
|
24
15
|
const SPLIT_HEADER = /(\S+)\s+(\S+)/;
|
|
25
16
|
class JWTStrategy extends strategy_1.AuthenticationBaseStrategy {
|
|
26
17
|
constructor() {
|
|
@@ -30,39 +21,44 @@ class JWTStrategy extends strategy_1.AuthenticationBaseStrategy {
|
|
|
30
21
|
get configuration() {
|
|
31
22
|
const authConfig = this.authentication.configuration;
|
|
32
23
|
const config = super.configuration;
|
|
33
|
-
return
|
|
24
|
+
return {
|
|
25
|
+
service: authConfig.service,
|
|
26
|
+
entity: authConfig.entity,
|
|
27
|
+
entityId: authConfig.entityId,
|
|
28
|
+
header: 'Authorization',
|
|
29
|
+
schemes: ['Bearer', 'JWT'],
|
|
30
|
+
...config
|
|
31
|
+
};
|
|
34
32
|
}
|
|
35
|
-
handleConnection(event, connection, authResult) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
});
|
|
33
|
+
async handleConnection(event, connection, authResult) {
|
|
34
|
+
const isValidLogout = event === 'logout' && connection.authentication && authResult &&
|
|
35
|
+
connection.authentication.accessToken === authResult.accessToken;
|
|
36
|
+
const { accessToken } = authResult || {};
|
|
37
|
+
if (accessToken && event === 'login') {
|
|
38
|
+
debug('Adding authentication information to connection');
|
|
39
|
+
const { exp } = await this.authentication.verifyAccessToken(accessToken);
|
|
40
|
+
// The time (in ms) until the token expires
|
|
41
|
+
const duration = (exp * 1000) - Date.now();
|
|
42
|
+
// This may have to be a `logout` event but right now we don't want
|
|
43
|
+
// the whole context object lingering around until the timer is gone
|
|
44
|
+
const timer = long_timeout_1.default.setTimeout(() => this.app.emit('disconnect', connection), duration);
|
|
45
|
+
debug(`Registering connection expiration timer for ${duration}ms`);
|
|
46
|
+
long_timeout_1.default.clearTimeout(this.expirationTimers.get(connection));
|
|
47
|
+
this.expirationTimers.set(connection, timer);
|
|
48
|
+
debug('Adding authentication information to connection');
|
|
49
|
+
connection.authentication = {
|
|
50
|
+
strategy: this.name,
|
|
51
|
+
accessToken
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
else if (event === 'disconnect' || isValidLogout) {
|
|
55
|
+
debug('Removing authentication information and expiration timer from connection');
|
|
56
|
+
const { entity } = this.configuration;
|
|
57
|
+
delete connection[entity];
|
|
58
|
+
delete connection.authentication;
|
|
59
|
+
long_timeout_1.default.clearTimeout(this.expirationTimers.get(connection));
|
|
60
|
+
this.expirationTimers.delete(connection);
|
|
61
|
+
}
|
|
66
62
|
}
|
|
67
63
|
verifyConfiguration() {
|
|
68
64
|
const allowedKeys = ['entity', 'entityId', 'service', 'header', 'schemes'];
|
|
@@ -75,10 +71,8 @@ class JWTStrategy extends strategy_1.AuthenticationBaseStrategy {
|
|
|
75
71
|
throw new Error(`The 'header' option for the ${this.name} strategy must be a string`);
|
|
76
72
|
}
|
|
77
73
|
}
|
|
78
|
-
getEntityQuery(_params) {
|
|
79
|
-
return
|
|
80
|
-
return {};
|
|
81
|
-
});
|
|
74
|
+
async getEntityQuery(_params) {
|
|
75
|
+
return {};
|
|
82
76
|
}
|
|
83
77
|
/**
|
|
84
78
|
* Return the entity for a given id
|
|
@@ -86,70 +80,65 @@ class JWTStrategy extends strategy_1.AuthenticationBaseStrategy {
|
|
|
86
80
|
* @param id The id to use
|
|
87
81
|
* @param params Service call parameters
|
|
88
82
|
*/
|
|
89
|
-
getEntity(id, params) {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
return entityService.get(id, Object.assign(Object.assign({}, params), { [entity]: result }));
|
|
104
|
-
});
|
|
83
|
+
async getEntity(id, params) {
|
|
84
|
+
const entityService = this.entityService;
|
|
85
|
+
const { entity } = this.configuration;
|
|
86
|
+
debug('Getting entity', id);
|
|
87
|
+
if (entityService === null) {
|
|
88
|
+
throw new errors_1.NotAuthenticated('Could not find entity service');
|
|
89
|
+
}
|
|
90
|
+
const query = await this.getEntityQuery(params);
|
|
91
|
+
const getParams = Object.assign({}, (0, omit_1.default)(params, 'provider'), { query });
|
|
92
|
+
const result = await entityService.get(id, getParams);
|
|
93
|
+
if (!params.provider) {
|
|
94
|
+
return result;
|
|
95
|
+
}
|
|
96
|
+
return entityService.get(id, { ...params, [entity]: result });
|
|
105
97
|
}
|
|
106
|
-
getEntityId(authResult, _params) {
|
|
107
|
-
return
|
|
108
|
-
return authResult.authentication.payload.sub;
|
|
109
|
-
});
|
|
98
|
+
async getEntityId(authResult, _params) {
|
|
99
|
+
return authResult.authentication.payload.sub;
|
|
110
100
|
}
|
|
111
|
-
authenticate(authentication, params) {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
101
|
+
async authenticate(authentication, params) {
|
|
102
|
+
const { accessToken } = authentication;
|
|
103
|
+
const { entity } = this.configuration;
|
|
104
|
+
if (!accessToken) {
|
|
105
|
+
throw new errors_1.NotAuthenticated('No access token');
|
|
106
|
+
}
|
|
107
|
+
const payload = await this.authentication.verifyAccessToken(accessToken, params.jwt);
|
|
108
|
+
const result = {
|
|
109
|
+
accessToken,
|
|
110
|
+
authentication: {
|
|
111
|
+
strategy: 'jwt',
|
|
120
112
|
accessToken,
|
|
121
|
-
|
|
122
|
-
strategy: 'jwt',
|
|
123
|
-
accessToken,
|
|
124
|
-
payload
|
|
125
|
-
}
|
|
126
|
-
};
|
|
127
|
-
if (entity === null) {
|
|
128
|
-
return result;
|
|
113
|
+
payload
|
|
129
114
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
return
|
|
133
|
-
}
|
|
115
|
+
};
|
|
116
|
+
if (entity === null) {
|
|
117
|
+
return result;
|
|
118
|
+
}
|
|
119
|
+
const entityId = await this.getEntityId(result, params);
|
|
120
|
+
const value = await this.getEntity(entityId, params);
|
|
121
|
+
return {
|
|
122
|
+
...result,
|
|
123
|
+
[entity]: value
|
|
124
|
+
};
|
|
134
125
|
}
|
|
135
|
-
parse(req) {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
};
|
|
152
|
-
});
|
|
126
|
+
async parse(req) {
|
|
127
|
+
const { header, schemes } = this.configuration;
|
|
128
|
+
const headerValue = req.headers && req.headers[header.toLowerCase()];
|
|
129
|
+
if (!headerValue || typeof headerValue !== 'string') {
|
|
130
|
+
return null;
|
|
131
|
+
}
|
|
132
|
+
debug('Found parsed header value');
|
|
133
|
+
const [, scheme, schemeValue] = headerValue.match(SPLIT_HEADER) || [];
|
|
134
|
+
const hasScheme = scheme && schemes.some(current => new RegExp(current, 'i').test(scheme));
|
|
135
|
+
if (scheme && !hasScheme) {
|
|
136
|
+
return null;
|
|
137
|
+
}
|
|
138
|
+
return {
|
|
139
|
+
strategy: this.name,
|
|
140
|
+
accessToken: hasScheme ? schemeValue : headerValue
|
|
141
|
+
};
|
|
153
142
|
}
|
|
154
143
|
}
|
|
155
144
|
exports.JWTStrategy = JWTStrategy;
|
package/lib/jwt.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jwt.js","sourceRoot":"","sources":["../src/jwt.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"jwt.js","sourceRoot":"","sources":["../src/jwt.ts"],"names":[],"mappings":";;;;;;AAAA,sDAAsD;AACtD,uDAA+B;AAE/B,+CAAsD;AAEtD,iDAAkD;AAClD,aAAa;AACb,gEAA8B;AAE9B,yCAAwD;AAGxD,MAAM,KAAK,GAAG,IAAA,qBAAW,EAAC,gCAAgC,CAAC,CAAC;AAC5D,MAAM,YAAY,GAAG,eAAe,CAAC;AAErC,MAAa,WAAY,SAAQ,qCAA0B;IAA3D;;QACE,qBAAgB,GAAG,IAAI,OAAO,EAAE,CAAC;IAgKnC,CAAC;IA9JC,IAAI,aAAa;QACf,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC;QACrD,MAAM,MAAM,GAAG,KAAK,CAAC,aAAa,CAAC;QAEnC,OAAO;YACL,OAAO,EAAE,UAAU,CAAC,OAAO;YAC3B,MAAM,EAAE,UAAU,CAAC,MAAM;YACzB,QAAQ,EAAE,UAAU,CAAC,QAAQ;YAC7B,MAAM,EAAE,eAAe;YACvB,OAAO,EAAE,CAAE,QAAQ,EAAE,KAAK,CAAE;YAC5B,GAAG,MAAM;SACV,CAAC;IACJ,CAAC;IAED,KAAK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AC,SAAS,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAErD,OAAO;YACL,GAAG,MAAM;YACT,CAAC,MAAM,CAAC,EAAE,KAAK;SAChB,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,KAAK,CAAE,GAAoB;QAI/B,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAA0C,IAAI,CAAC,aAAa,CAAC;QACtF,MAAM,WAAW,GAAG,GAAG,CAAC,OAAO,IAAI,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC;QAErE,IAAI,CAAC,WAAW,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;YACnD,OAAO,IAAI,CAAC;SACb;QAED,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAEnC,MAAM,CAAE,AAAD,EAAG,MAAM,EAAE,WAAW,CAAE,GAAG,WAAW,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;QACxE,MAAM,SAAS,GAAG,MAAM,IAAI,OAAO,CAAC,IAAI,CACtC,OAAO,CAAC,EAAE,CAAC,IAAI,MAAM,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CACjD,CAAC;QAEF,IAAI,MAAM,IAAI,CAAC,SAAS,EAAE;YACxB,OAAO,IAAI,CAAC;SACb;QAED,OAAO;YACL,QAAQ,EAAE,IAAI,CAAC,IAAI;YACnB,WAAW,EAAE,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW;SACnD,CAAC;IACJ,CAAC;CACF;AAjKD,kCAiKC"}
|
package/lib/service.d.ts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { AuthenticationBase, AuthenticationResult, AuthenticationRequest } from './core';
|
|
2
2
|
import '@feathersjs/transport-commons';
|
|
3
|
-
import {
|
|
3
|
+
import { Params, ServiceMethods, ServiceAddons } from '@feathersjs/feathers';
|
|
4
4
|
declare module '@feathersjs/feathers/lib/declarations' {
|
|
5
|
-
interface
|
|
5
|
+
interface FeathersApplication<Services, Settings> {
|
|
6
6
|
/**
|
|
7
7
|
* Returns the default authentication service or the
|
|
8
8
|
* authentication service for a given path.
|
|
9
9
|
*
|
|
10
10
|
* @param location The service path to use (optional)
|
|
11
11
|
*/
|
|
12
|
-
defaultAuthentication(location?: string): AuthenticationService;
|
|
12
|
+
defaultAuthentication?(location?: string): AuthenticationService;
|
|
13
13
|
}
|
|
14
14
|
interface Params {
|
|
15
15
|
authenticated?: boolean;
|
|
16
16
|
authentication?: AuthenticationRequest;
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
export interface AuthenticationService extends ServiceAddons<AuthenticationResult> {
|
|
19
|
+
export interface AuthenticationService extends ServiceAddons<AuthenticationResult, AuthenticationResult> {
|
|
20
20
|
}
|
|
21
21
|
export declare class AuthenticationService extends AuthenticationBase implements Partial<ServiceMethods<AuthenticationResult>> {
|
|
22
|
-
constructor(app:
|
|
22
|
+
constructor(app: any, configKey?: string, options?: {});
|
|
23
23
|
/**
|
|
24
24
|
* Return the payload for a JWT based on the authentication result.
|
|
25
25
|
* Called internally by the `create` method.
|
|
@@ -43,7 +43,7 @@ export declare class AuthenticationService extends AuthenticationBase implements
|
|
|
43
43
|
* @param data The authentication request (should include `strategy` key)
|
|
44
44
|
* @param params Service call parameters
|
|
45
45
|
*/
|
|
46
|
-
create(data: AuthenticationRequest, params
|
|
46
|
+
create(data: AuthenticationRequest, params?: Params): Promise<AuthenticationResult>;
|
|
47
47
|
/**
|
|
48
48
|
* Mark a JWT as removed. By default only verifies the JWT and returns the result.
|
|
49
49
|
* Triggers the `logout` event.
|
|
@@ -51,9 +51,9 @@ export declare class AuthenticationService extends AuthenticationBase implements
|
|
|
51
51
|
* @param id The JWT to remove or null
|
|
52
52
|
* @param params Service call parameters
|
|
53
53
|
*/
|
|
54
|
-
remove(id: string | null, params
|
|
54
|
+
remove(id: string | null, params?: Params): Promise<AuthenticationResult>;
|
|
55
55
|
/**
|
|
56
56
|
* Validates the service configuration.
|
|
57
57
|
*/
|
|
58
|
-
setup(): void
|
|
58
|
+
setup(): Promise<void>;
|
|
59
59
|
}
|
package/lib/service.js
CHANGED
|
@@ -1,26 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
4
|
};
|
|
14
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
6
|
exports.AuthenticationService = void 0;
|
|
16
|
-
const debug_1 = __importDefault(require("debug"));
|
|
17
7
|
const merge_1 = __importDefault(require("lodash/merge"));
|
|
18
8
|
const errors_1 = require("@feathersjs/errors");
|
|
19
9
|
const core_1 = require("./core");
|
|
20
10
|
const hooks_1 = require("./hooks");
|
|
21
11
|
require("@feathersjs/transport-commons");
|
|
12
|
+
const commons_1 = require("@feathersjs/commons");
|
|
22
13
|
const jsonwebtoken_1 = __importDefault(require("jsonwebtoken"));
|
|
23
|
-
const debug =
|
|
14
|
+
const debug = (0, commons_1.createDebug)('@feathersjs/authentication/service');
|
|
24
15
|
class AuthenticationService extends core_1.AuthenticationBase {
|
|
25
16
|
constructor(app, configKey = 'authentication', options = {}) {
|
|
26
17
|
super(app, configKey, options);
|
|
@@ -39,12 +30,10 @@ class AuthenticationService extends core_1.AuthenticationBase {
|
|
|
39
30
|
* @param _authResult The current authentication result
|
|
40
31
|
* @param params The service call parameters
|
|
41
32
|
*/
|
|
42
|
-
getPayload(_authResult, params) {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
return payload;
|
|
47
|
-
});
|
|
33
|
+
async getPayload(_authResult, params) {
|
|
34
|
+
// Uses `params.payload` or returns an empty payload
|
|
35
|
+
const { payload = {} } = params;
|
|
36
|
+
return payload;
|
|
48
37
|
}
|
|
49
38
|
/**
|
|
50
39
|
* Returns the JWT options based on an authentication result.
|
|
@@ -53,22 +42,20 @@ class AuthenticationService extends core_1.AuthenticationBase {
|
|
|
53
42
|
* @param authResult The authentication result
|
|
54
43
|
* @param params Service call parameters
|
|
55
44
|
*/
|
|
56
|
-
getTokenOptions(authResult, params) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
throw new errors_1.NotAuthenticated(`Can not set subject from ${entity}.${idProperty}`);
|
|
67
|
-
}
|
|
68
|
-
jwtOptions.subject = `${subject}`;
|
|
45
|
+
async getTokenOptions(authResult, params) {
|
|
46
|
+
const { service, entity, entityId } = this.configuration;
|
|
47
|
+
const jwtOptions = (0, merge_1.default)({}, params.jwtOptions, params.jwt);
|
|
48
|
+
const value = service && entity && authResult[entity];
|
|
49
|
+
// Set the subject to the entity id if it is available
|
|
50
|
+
if (value && !jwtOptions.subject) {
|
|
51
|
+
const idProperty = entityId || this.app.service(service).id;
|
|
52
|
+
const subject = value[idProperty];
|
|
53
|
+
if (subject === undefined) {
|
|
54
|
+
throw new errors_1.NotAuthenticated(`Can not set subject from ${entity}.${idProperty}`);
|
|
69
55
|
}
|
|
70
|
-
|
|
71
|
-
}
|
|
56
|
+
jwtOptions.subject = `${subject}`;
|
|
57
|
+
}
|
|
58
|
+
return jwtOptions;
|
|
72
59
|
}
|
|
73
60
|
/**
|
|
74
61
|
* Create and return a new JWT for a given authentication request.
|
|
@@ -77,29 +64,27 @@ class AuthenticationService extends core_1.AuthenticationBase {
|
|
|
77
64
|
* @param data The authentication request (should include `strategy` key)
|
|
78
65
|
* @param params Service call parameters
|
|
79
66
|
*/
|
|
80
|
-
create(data, params) {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
67
|
+
async create(data, params) {
|
|
68
|
+
const authStrategies = params.authStrategies || this.configuration.authStrategies;
|
|
69
|
+
if (!authStrategies.length) {
|
|
70
|
+
throw new errors_1.NotAuthenticated('No authentication strategies allowed for creating a JWT (`authStrategies`)');
|
|
71
|
+
}
|
|
72
|
+
const authResult = await this.authenticate(data, params, ...authStrategies);
|
|
73
|
+
debug('Got authentication result', authResult);
|
|
74
|
+
if (authResult.accessToken) {
|
|
75
|
+
return authResult;
|
|
76
|
+
}
|
|
77
|
+
const [payload, jwtOptions] = await Promise.all([
|
|
78
|
+
this.getPayload(authResult, params),
|
|
79
|
+
this.getTokenOptions(authResult, params)
|
|
80
|
+
]);
|
|
81
|
+
debug('Creating JWT with', payload, jwtOptions);
|
|
82
|
+
const accessToken = await this.createAccessToken(payload, jwtOptions, params.secret);
|
|
83
|
+
return (0, merge_1.default)({ accessToken }, authResult, {
|
|
84
|
+
authentication: {
|
|
85
|
+
accessToken,
|
|
86
|
+
payload: jsonwebtoken_1.default.decode(accessToken)
|
|
90
87
|
}
|
|
91
|
-
const [payload, jwtOptions] = yield Promise.all([
|
|
92
|
-
this.getPayload(authResult, params),
|
|
93
|
-
this.getTokenOptions(authResult, params)
|
|
94
|
-
]);
|
|
95
|
-
debug('Creating JWT with', payload, jwtOptions);
|
|
96
|
-
const accessToken = yield this.createAccessToken(payload, jwtOptions, params.secret);
|
|
97
|
-
return merge_1.default({ accessToken }, authResult, {
|
|
98
|
-
authentication: {
|
|
99
|
-
accessToken,
|
|
100
|
-
payload: jsonwebtoken_1.default.decode(accessToken)
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
88
|
});
|
|
104
89
|
}
|
|
105
90
|
/**
|
|
@@ -109,22 +94,20 @@ class AuthenticationService extends core_1.AuthenticationBase {
|
|
|
109
94
|
* @param id The JWT to remove or null
|
|
110
95
|
* @param params Service call parameters
|
|
111
96
|
*/
|
|
112
|
-
remove(id, params) {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
return this.authenticate(authentication, params, ...authStrategies);
|
|
122
|
-
});
|
|
97
|
+
async remove(id, params) {
|
|
98
|
+
const { authentication } = params;
|
|
99
|
+
const { authStrategies } = this.configuration;
|
|
100
|
+
// When an id is passed it is expected to be the authentication `accessToken`
|
|
101
|
+
if (id !== null && id !== authentication.accessToken) {
|
|
102
|
+
throw new errors_1.NotAuthenticated('Invalid access token');
|
|
103
|
+
}
|
|
104
|
+
debug('Verifying authentication strategy in remove');
|
|
105
|
+
return this.authenticate(authentication, params, ...authStrategies);
|
|
123
106
|
}
|
|
124
107
|
/**
|
|
125
108
|
* Validates the service configuration.
|
|
126
109
|
*/
|
|
127
|
-
setup() {
|
|
110
|
+
async setup() {
|
|
128
111
|
// The setup method checks for valid settings and registers the
|
|
129
112
|
// connection and event (login, logout) hooks
|
|
130
113
|
const { secret, service, entity, entityId } = this.configuration;
|
|
@@ -143,14 +126,12 @@ class AuthenticationService extends core_1.AuthenticationBase {
|
|
|
143
126
|
}
|
|
144
127
|
}
|
|
145
128
|
this.hooks({
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
129
|
+
create: [(0, hooks_1.connection)('login'), (0, hooks_1.event)('login')],
|
|
130
|
+
remove: [(0, hooks_1.connection)('logout'), (0, hooks_1.event)('logout')]
|
|
131
|
+
});
|
|
132
|
+
this.app.on('disconnect', async (connection) => {
|
|
133
|
+
await this.handleConnection('disconnect', connection);
|
|
150
134
|
});
|
|
151
|
-
this.app.on('disconnect', (connection) => __awaiter(this, void 0, void 0, function* () {
|
|
152
|
-
yield this.handleConnection('disconnect', connection);
|
|
153
|
-
}));
|
|
154
135
|
if (typeof this.publish === 'function') {
|
|
155
136
|
this.publish(() => null);
|
|
156
137
|
}
|
package/lib/service.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../src/service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../src/service.ts"],"names":[],"mappings":";;;;;;AAAA,yDAAiC;AACjC,+CAAsD;AACtD,iCAAyF;AACzF,mCAA4C;AAC5C,yCAAuC;AACvC,iDAAkD;AAElD,gEAAwC;AAExC,MAAM,KAAK,GAAG,IAAA,qBAAW,EAAC,oCAAoC,CAAC,CAAC;AAsBhE,MAAa,qBAAsB,SAAQ,yBAAkB;IAC3D,YAAa,GAAQ,EAAE,SAAS,GAAG,gBAAgB,EAAE,OAAO,GAAG,EAAE;QAC/D,KAAK,CAAC,GAAG,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;QAE/B,IAAI,OAAO,GAAG,CAAC,qBAAqB,KAAK,UAAU,EAAE;YACnD,GAAG,CAAC,qBAAqB,GAAG,UAAU,QAAiB;gBACrD,MAAM,SAAS,GAAG,GAAG,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;gBACnD,MAAM,IAAI,GAAG,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CACjE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,SAAS,KAAK,SAAS,CAC9C,CAAC;gBAEF,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAA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