@feathersjs/authentication 5.0.0-pre.3 → 5.0.0-pre.31
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 +262 -261
- package/LICENSE +1 -1
- package/README.md +2 -2
- package/lib/core.d.ts +30 -4
- package/lib/core.js +84 -80
- package/lib/core.js.map +1 -1
- package/lib/hooks/authenticate.d.ts +3 -3
- package/lib/hooks/authenticate.js +12 -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 +4 -13
- package/lib/hooks/event.js.map +1 -1
- package/lib/hooks/index.js.map +1 -1
- package/lib/index.d.ts +4 -5
- package/lib/index.js +11 -6
- package/lib/index.js.map +1 -1
- package/lib/jwt.d.ts +3 -3
- package/lib/jwt.js +97 -106
- package/lib/jwt.js.map +1 -1
- package/lib/options.d.ts +5 -3
- package/lib/options.js +4 -1
- package/lib/options.js.map +1 -1
- package/lib/service.d.ts +10 -8
- package/lib/service.js +82 -97
- package/lib/service.js.map +1 -1
- package/lib/strategy.d.ts +1 -1
- package/lib/strategy.js.map +1 -1
- package/package.json +24 -22
- package/src/core.ts +133 -83
- package/src/hooks/authenticate.ts +36 -33
- package/src/hooks/connection.ts +15 -14
- package/src/hooks/event.ts +11 -11
- package/src/hooks/index.ts +3 -3
- package/src/index.ts +8 -10
- package/src/jwt.ts +85 -75
- package/src/options.ts +9 -3
- package/src/service.ts +87 -73
- package/src/strategy.ts +17 -17
package/lib/service.js
CHANGED
|
@@ -1,13 +1,4 @@
|
|
|
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
|
};
|
|
@@ -15,19 +6,29 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
6
|
exports.AuthenticationService = void 0;
|
|
16
7
|
const merge_1 = __importDefault(require("lodash/merge"));
|
|
17
8
|
const errors_1 = require("@feathersjs/errors");
|
|
18
|
-
const core_1 = require("./core");
|
|
19
|
-
const hooks_1 = require("./hooks");
|
|
20
9
|
require("@feathersjs/transport-commons");
|
|
21
10
|
const commons_1 = require("@feathersjs/commons");
|
|
11
|
+
const schema_1 = require("@feathersjs/schema");
|
|
22
12
|
const jsonwebtoken_1 = __importDefault(require("jsonwebtoken"));
|
|
23
|
-
const
|
|
13
|
+
const hooks_1 = require("@feathersjs/hooks");
|
|
14
|
+
const core_1 = require("./core");
|
|
15
|
+
const hooks_2 = require("./hooks");
|
|
16
|
+
const debug = (0, commons_1.createDebug)('@feathersjs/authentication/service');
|
|
24
17
|
class AuthenticationService extends core_1.AuthenticationBase {
|
|
25
18
|
constructor(app, configKey = 'authentication', options = {}) {
|
|
26
19
|
super(app, configKey, options);
|
|
20
|
+
(0, hooks_1.hooks)(this, {
|
|
21
|
+
create: [(0, schema_1.resolveDispatch)(), (0, hooks_2.connection)('login'), (0, hooks_2.event)('login')],
|
|
22
|
+
remove: [(0, schema_1.resolveDispatch)(), (0, hooks_2.connection)('logout'), (0, hooks_2.event)('logout')]
|
|
23
|
+
});
|
|
24
|
+
this.app.on('disconnect', async (connection) => {
|
|
25
|
+
await this.handleConnection('disconnect', connection);
|
|
26
|
+
});
|
|
27
27
|
if (typeof app.defaultAuthentication !== 'function') {
|
|
28
28
|
app.defaultAuthentication = function (location) {
|
|
29
29
|
const configKey = app.get('defaultAuthentication');
|
|
30
|
-
const path = location ||
|
|
30
|
+
const path = location ||
|
|
31
|
+
Object.keys(this.services).find((current) => this.service(current).configKey === configKey);
|
|
31
32
|
return path ? this.service(path) : null;
|
|
32
33
|
};
|
|
33
34
|
}
|
|
@@ -39,12 +40,10 @@ class AuthenticationService extends core_1.AuthenticationBase {
|
|
|
39
40
|
* @param _authResult The current authentication result
|
|
40
41
|
* @param params The service call parameters
|
|
41
42
|
*/
|
|
42
|
-
getPayload(_authResult, params) {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
return payload;
|
|
47
|
-
});
|
|
43
|
+
async getPayload(_authResult, params) {
|
|
44
|
+
// Uses `params.payload` or returns an empty payload
|
|
45
|
+
const { payload = {} } = params;
|
|
46
|
+
return payload;
|
|
48
47
|
}
|
|
49
48
|
/**
|
|
50
49
|
* Returns the JWT options based on an authentication result.
|
|
@@ -53,22 +52,20 @@ class AuthenticationService extends core_1.AuthenticationBase {
|
|
|
53
52
|
* @param authResult The authentication result
|
|
54
53
|
* @param params Service call parameters
|
|
55
54
|
*/
|
|
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}`;
|
|
55
|
+
async getTokenOptions(authResult, params) {
|
|
56
|
+
const { service, entity, entityId } = this.configuration;
|
|
57
|
+
const jwtOptions = (0, merge_1.default)({}, params.jwtOptions, params.jwt);
|
|
58
|
+
const value = service && entity && authResult[entity];
|
|
59
|
+
// Set the subject to the entity id if it is available
|
|
60
|
+
if (value && !jwtOptions.subject) {
|
|
61
|
+
const idProperty = entityId || this.app.service(service).id;
|
|
62
|
+
const subject = value[idProperty];
|
|
63
|
+
if (subject === undefined) {
|
|
64
|
+
throw new errors_1.NotAuthenticated(`Can not set subject from ${entity}.${idProperty}`);
|
|
69
65
|
}
|
|
70
|
-
|
|
71
|
-
}
|
|
66
|
+
jwtOptions.subject = `${subject}`;
|
|
67
|
+
}
|
|
68
|
+
return jwtOptions;
|
|
72
69
|
}
|
|
73
70
|
/**
|
|
74
71
|
* Create and return a new JWT for a given authentication request.
|
|
@@ -77,30 +74,30 @@ class AuthenticationService extends core_1.AuthenticationBase {
|
|
|
77
74
|
* @param data The authentication request (should include `strategy` key)
|
|
78
75
|
* @param params Service call parameters
|
|
79
76
|
*/
|
|
80
|
-
create(data, params) {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
77
|
+
async create(data, params) {
|
|
78
|
+
const authStrategies = params.authStrategies || this.configuration.authStrategies;
|
|
79
|
+
if (!authStrategies.length) {
|
|
80
|
+
throw new errors_1.NotAuthenticated('No authentication strategies allowed for creating a JWT (`authStrategies`)');
|
|
81
|
+
}
|
|
82
|
+
const authResult = await this.authenticate(data, params, ...authStrategies);
|
|
83
|
+
debug('Got authentication result', authResult);
|
|
84
|
+
if (authResult.accessToken) {
|
|
85
|
+
return authResult;
|
|
86
|
+
}
|
|
87
|
+
const [payload, jwtOptions] = await Promise.all([
|
|
88
|
+
this.getPayload(authResult, params),
|
|
89
|
+
this.getTokenOptions(authResult, params)
|
|
90
|
+
]);
|
|
91
|
+
debug('Creating JWT with', payload, jwtOptions);
|
|
92
|
+
const accessToken = await this.createAccessToken(payload, jwtOptions, params.secret);
|
|
93
|
+
return {
|
|
94
|
+
accessToken,
|
|
95
|
+
...authResult,
|
|
96
|
+
authentication: {
|
|
97
|
+
...authResult.authentication,
|
|
98
|
+
payload: jsonwebtoken_1.default.decode(accessToken)
|
|
90
99
|
}
|
|
91
|
-
|
|
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
|
-
});
|
|
100
|
+
};
|
|
104
101
|
}
|
|
105
102
|
/**
|
|
106
103
|
* Mark a JWT as removed. By default only verifies the JWT and returns the result.
|
|
@@ -109,53 +106,41 @@ class AuthenticationService extends core_1.AuthenticationBase {
|
|
|
109
106
|
* @param id The JWT to remove or null
|
|
110
107
|
* @param params Service call parameters
|
|
111
108
|
*/
|
|
112
|
-
remove(id, params) {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
return this.authenticate(authentication, params, ...authStrategies);
|
|
122
|
-
});
|
|
109
|
+
async remove(id, params) {
|
|
110
|
+
const { authentication } = params;
|
|
111
|
+
const { authStrategies } = this.configuration;
|
|
112
|
+
// When an id is passed it is expected to be the authentication `accessToken`
|
|
113
|
+
if (id !== null && id !== authentication.accessToken) {
|
|
114
|
+
throw new errors_1.NotAuthenticated('Invalid access token');
|
|
115
|
+
}
|
|
116
|
+
debug('Verifying authentication strategy in remove');
|
|
117
|
+
return this.authenticate(authentication, params, ...authStrategies);
|
|
123
118
|
}
|
|
124
119
|
/**
|
|
125
120
|
* Validates the service configuration.
|
|
126
121
|
*/
|
|
127
|
-
setup() {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
122
|
+
async setup() {
|
|
123
|
+
await super.setup();
|
|
124
|
+
// The setup method checks for valid settings and registers the
|
|
125
|
+
// connection and event (login, logout) hooks
|
|
126
|
+
const { secret, service, entity, entityId } = this.configuration;
|
|
127
|
+
if (typeof secret !== 'string') {
|
|
128
|
+
throw new Error("A 'secret' must be provided in your authentication configuration");
|
|
129
|
+
}
|
|
130
|
+
if (entity !== null) {
|
|
131
|
+
if (service === undefined) {
|
|
132
|
+
throw new Error("The 'service' option is not set in the authentication configuration");
|
|
134
133
|
}
|
|
135
|
-
if (
|
|
136
|
-
|
|
137
|
-
throw new Error('The \'service\' option is not set in the authentication configuration');
|
|
138
|
-
}
|
|
139
|
-
if (this.app.service(service) === undefined) {
|
|
140
|
-
throw new Error(`The '${service}' entity service does not exist (set to 'null' if it is not required)`);
|
|
141
|
-
}
|
|
142
|
-
if (this.app.service(service).id === undefined && entityId === undefined) {
|
|
143
|
-
throw new Error(`The '${service}' service does not have an 'id' property and no 'entityId' option is set.`);
|
|
144
|
-
}
|
|
134
|
+
if (this.app.service(service) === undefined) {
|
|
135
|
+
throw new Error(`The '${service}' entity service does not exist (set to 'null' if it is not required)`);
|
|
145
136
|
}
|
|
146
|
-
this.
|
|
147
|
-
|
|
148
|
-
create: [hooks_1.connection('login'), hooks_1.event('login')],
|
|
149
|
-
remove: [hooks_1.connection('logout'), hooks_1.event('logout')]
|
|
150
|
-
}
|
|
151
|
-
});
|
|
152
|
-
this.app.on('disconnect', (connection) => __awaiter(this, void 0, void 0, function* () {
|
|
153
|
-
yield this.handleConnection('disconnect', connection);
|
|
154
|
-
}));
|
|
155
|
-
if (typeof this.publish === 'function') {
|
|
156
|
-
this.publish(() => null);
|
|
137
|
+
if (this.app.service(service).id === undefined && entityId === undefined) {
|
|
138
|
+
throw new Error(`The '${service}' service does not have an 'id' property and no 'entityId' option is set.`);
|
|
157
139
|
}
|
|
158
|
-
}
|
|
140
|
+
}
|
|
141
|
+
if (typeof this.publish === 'function') {
|
|
142
|
+
this.publish(() => null);
|
|
143
|
+
}
|
|
159
144
|
}
|
|
160
145
|
}
|
|
161
146
|
exports.AuthenticationService = AuthenticationService;
|
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,yDAAgC;AAChC,+CAAqD;AACrD,yCAAsC;AACtC,iDAAiD;AAEjD,+CAAoD;AACpD,gEAAuC;AACvC,6CAAyC;AAEzC,iCAA8G;AAC9G,mCAA2C;AAE3C,MAAM,KAAK,GAAG,IAAA,qBAAW,EAAC,oCAAoC,CAAC,CAAA;AAwB/D,MAAa,qBACX,SAAQ,yBAAkB;IAG1B,YAAY,GAAQ,EAAE,SAAS,GAAG,gBAAgB,EAAE,OAAO,GAAG,EAAE;QAC9D,KAAK,CAAC,GAAG,EAAE,SAAS,EAAE,OAAO,CAAC,CAAA;QAE9B,IAAA,aAAK,EAAC,IAAI,EAAE;YACV,MAAM,EAAE,CAAC,IAAA,wBAAe,GAAE,EAAE,IAAA,kBAAU,EAAC,OAAO,CAAC,EAAE,IAAA,aAAK,EAAC,OAAO,CAAC,CAAC;YAChE,MAAM,EAAE,CAAC,IAAA,wBAAe,GAAE,EAAE,IAAA,kBAAU,EAAC,QAAQ,CAAC,EAAE,IAAA,aAAK,EAAC,QAAQ,CAAC,CAAC;SACnE,CAAC,CAAA;QAEF,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE;YAC7C,MAAM,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE,UAAU,CAAC,CAAA;QACvD,CAAC,CAAC,CAAA;QAEF,IAAI,OAAO,GAAG,CAAC,qBAAqB,KAAK,UAAU,EAAE;YACnD,GAAG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AAC,OAAO,KAAK,UAAU,EAAE;YACtC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAA;SACzB;IACH,CAAC;CACF;AAtKD,sDAsKC"}
|
package/lib/strategy.d.ts
CHANGED
package/lib/strategy.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strategy.js","sourceRoot":"","sources":["../src/strategy.ts"],"names":[],"mappings":";;;AAGA,MAAa,0BAA0B;IAKrC,iBAAiB,
|
|
1
|
+
{"version":3,"file":"strategy.js","sourceRoot":"","sources":["../src/strategy.ts"],"names":[],"mappings":";;;AAGA,MAAa,0BAA0B;IAKrC,iBAAiB,CAAC,IAAwB;QACxC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAA;IAC5B,CAAC;IAED,cAAc,CAAC,GAAgB;QAC7B,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;IAChB,CAAC;IAED,OAAO,CAAC,IAAY;QAClB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;IAClB,CAAC;IAED,IAAI,aAAa;QACf,OAAO,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACrD,CAAC;IAED,IAAI,aAAa;QACf,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,aAAa,CAAA;QAEtC,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,IAAI,CAAA;SACZ;QAED,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,IAAI,CAAA;IAC1C,CAAC;CACF;AA9BD,gEA8BC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@feathersjs/authentication",
|
|
3
3
|
"description": "Add Authentication to your FeathersJS app.",
|
|
4
|
-
"version": "5.0.0-pre.
|
|
4
|
+
"version": "5.0.0-pre.31",
|
|
5
5
|
"homepage": "https://feathersjs.com",
|
|
6
6
|
"main": "lib/",
|
|
7
7
|
"types": "lib/",
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
},
|
|
17
17
|
"repository": {
|
|
18
18
|
"type": "git",
|
|
19
|
-
"url": "git://github.com/feathersjs/feathers.git"
|
|
19
|
+
"url": "git://github.com/feathersjs/feathers.git",
|
|
20
|
+
"directory": "packages/authentication"
|
|
20
21
|
},
|
|
21
22
|
"author": {
|
|
22
23
|
"name": "Feathers contributors",
|
|
@@ -41,9 +42,9 @@
|
|
|
41
42
|
},
|
|
42
43
|
"scripts": {
|
|
43
44
|
"prepublish": "npm run compile",
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
45
|
+
"pack": "npm pack --pack-destination ../cli/test/build",
|
|
46
|
+
"compile": "shx rm -rf lib/ && tsc && npm run pack",
|
|
47
|
+
"test": "mocha --config ../../.mocharc.json --recursive test/**.test.ts test/**/*.test.ts"
|
|
47
48
|
},
|
|
48
49
|
"directories": {
|
|
49
50
|
"lib": "lib"
|
|
@@ -52,27 +53,28 @@
|
|
|
52
53
|
"access": "public"
|
|
53
54
|
},
|
|
54
55
|
"dependencies": {
|
|
55
|
-
"@feathersjs/commons": "^5.0.0-pre.
|
|
56
|
-
"@feathersjs/errors": "^5.0.0-pre.
|
|
57
|
-
"@feathersjs/feathers": "^5.0.0-pre.
|
|
58
|
-
"@feathersjs/
|
|
59
|
-
"@
|
|
56
|
+
"@feathersjs/commons": "^5.0.0-pre.31",
|
|
57
|
+
"@feathersjs/errors": "^5.0.0-pre.31",
|
|
58
|
+
"@feathersjs/feathers": "^5.0.0-pre.31",
|
|
59
|
+
"@feathersjs/hooks": "^0.7.5",
|
|
60
|
+
"@feathersjs/schema": "^5.0.0-pre.31",
|
|
61
|
+
"@feathersjs/transport-commons": "^5.0.0-pre.31",
|
|
62
|
+
"@types/jsonwebtoken": "^8.5.9",
|
|
60
63
|
"jsonwebtoken": "^8.5.1",
|
|
61
64
|
"lodash": "^4.17.21",
|
|
62
65
|
"long-timeout": "^0.1.1",
|
|
63
|
-
"uuid": "^
|
|
66
|
+
"uuid": "^9.0.0"
|
|
64
67
|
},
|
|
65
68
|
"devDependencies": {
|
|
66
|
-
"@feathersjs/
|
|
67
|
-
"@types/
|
|
68
|
-
"@types/
|
|
69
|
-
"@types/
|
|
70
|
-
"@types/
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"typescript": "^4.2.4"
|
|
69
|
+
"@feathersjs/memory": "^5.0.0-pre.31",
|
|
70
|
+
"@types/lodash": "^4.14.186",
|
|
71
|
+
"@types/mocha": "^10.0.0",
|
|
72
|
+
"@types/node": "^18.8.2",
|
|
73
|
+
"@types/uuid": "^8.3.4",
|
|
74
|
+
"mocha": "^10.0.0",
|
|
75
|
+
"shx": "^0.3.4",
|
|
76
|
+
"ts-node": "^10.9.1",
|
|
77
|
+
"typescript": "^4.8.4"
|
|
76
78
|
},
|
|
77
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "4500dbeb8cea566678cf88b3313a88efd93a2ed9"
|
|
78
80
|
}
|