@feathersjs/authentication 5.0.0-pre.3 → 5.0.0-pre.30
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 +257 -262
- 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 +78 -94
- package/lib/service.js.map +1 -1
- package/lib/strategy.d.ts +1 -1
- package/lib/strategy.js.map +1 -1
- package/package.json +23 -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 +83 -71
- 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
|
};
|
|
@@ -19,15 +10,17 @@ const core_1 = require("./core");
|
|
|
19
10
|
const hooks_1 = require("./hooks");
|
|
20
11
|
require("@feathersjs/transport-commons");
|
|
21
12
|
const commons_1 = require("@feathersjs/commons");
|
|
13
|
+
const schema_1 = require("@feathersjs/schema");
|
|
22
14
|
const jsonwebtoken_1 = __importDefault(require("jsonwebtoken"));
|
|
23
|
-
const debug = commons_1.createDebug('@feathersjs/authentication/service');
|
|
15
|
+
const debug = (0, commons_1.createDebug)('@feathersjs/authentication/service');
|
|
24
16
|
class AuthenticationService extends core_1.AuthenticationBase {
|
|
25
17
|
constructor(app, configKey = 'authentication', options = {}) {
|
|
26
18
|
super(app, configKey, options);
|
|
27
19
|
if (typeof app.defaultAuthentication !== 'function') {
|
|
28
20
|
app.defaultAuthentication = function (location) {
|
|
29
21
|
const configKey = app.get('defaultAuthentication');
|
|
30
|
-
const path = location ||
|
|
22
|
+
const path = location ||
|
|
23
|
+
Object.keys(this.services).find((current) => this.service(current).configKey === configKey);
|
|
31
24
|
return path ? this.service(path) : null;
|
|
32
25
|
};
|
|
33
26
|
}
|
|
@@ -39,12 +32,10 @@ class AuthenticationService extends core_1.AuthenticationBase {
|
|
|
39
32
|
* @param _authResult The current authentication result
|
|
40
33
|
* @param params The service call parameters
|
|
41
34
|
*/
|
|
42
|
-
getPayload(_authResult, params) {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
return payload;
|
|
47
|
-
});
|
|
35
|
+
async getPayload(_authResult, params) {
|
|
36
|
+
// Uses `params.payload` or returns an empty payload
|
|
37
|
+
const { payload = {} } = params;
|
|
38
|
+
return payload;
|
|
48
39
|
}
|
|
49
40
|
/**
|
|
50
41
|
* Returns the JWT options based on an authentication result.
|
|
@@ -53,22 +44,20 @@ class AuthenticationService extends core_1.AuthenticationBase {
|
|
|
53
44
|
* @param authResult The authentication result
|
|
54
45
|
* @param params Service call parameters
|
|
55
46
|
*/
|
|
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}`;
|
|
47
|
+
async getTokenOptions(authResult, params) {
|
|
48
|
+
const { service, entity, entityId } = this.configuration;
|
|
49
|
+
const jwtOptions = (0, merge_1.default)({}, params.jwtOptions, params.jwt);
|
|
50
|
+
const value = service && entity && authResult[entity];
|
|
51
|
+
// Set the subject to the entity id if it is available
|
|
52
|
+
if (value && !jwtOptions.subject) {
|
|
53
|
+
const idProperty = entityId || this.app.service(service).id;
|
|
54
|
+
const subject = value[idProperty];
|
|
55
|
+
if (subject === undefined) {
|
|
56
|
+
throw new errors_1.NotAuthenticated(`Can not set subject from ${entity}.${idProperty}`);
|
|
69
57
|
}
|
|
70
|
-
|
|
71
|
-
}
|
|
58
|
+
jwtOptions.subject = `${subject}`;
|
|
59
|
+
}
|
|
60
|
+
return jwtOptions;
|
|
72
61
|
}
|
|
73
62
|
/**
|
|
74
63
|
* Create and return a new JWT for a given authentication request.
|
|
@@ -77,30 +66,30 @@ class AuthenticationService extends core_1.AuthenticationBase {
|
|
|
77
66
|
* @param data The authentication request (should include `strategy` key)
|
|
78
67
|
* @param params Service call parameters
|
|
79
68
|
*/
|
|
80
|
-
create(data, params) {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
69
|
+
async create(data, params) {
|
|
70
|
+
const authStrategies = params.authStrategies || this.configuration.authStrategies;
|
|
71
|
+
if (!authStrategies.length) {
|
|
72
|
+
throw new errors_1.NotAuthenticated('No authentication strategies allowed for creating a JWT (`authStrategies`)');
|
|
73
|
+
}
|
|
74
|
+
const authResult = await this.authenticate(data, params, ...authStrategies);
|
|
75
|
+
debug('Got authentication result', authResult);
|
|
76
|
+
if (authResult.accessToken) {
|
|
77
|
+
return authResult;
|
|
78
|
+
}
|
|
79
|
+
const [payload, jwtOptions] = await Promise.all([
|
|
80
|
+
this.getPayload(authResult, params),
|
|
81
|
+
this.getTokenOptions(authResult, params)
|
|
82
|
+
]);
|
|
83
|
+
debug('Creating JWT with', payload, jwtOptions);
|
|
84
|
+
const accessToken = await this.createAccessToken(payload, jwtOptions, params.secret);
|
|
85
|
+
return {
|
|
86
|
+
accessToken,
|
|
87
|
+
...authResult,
|
|
88
|
+
authentication: {
|
|
89
|
+
...authResult.authentication,
|
|
90
|
+
payload: jsonwebtoken_1.default.decode(accessToken)
|
|
90
91
|
}
|
|
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
|
-
});
|
|
92
|
+
};
|
|
104
93
|
}
|
|
105
94
|
/**
|
|
106
95
|
* Mark a JWT as removed. By default only verifies the JWT and returns the result.
|
|
@@ -109,53 +98,48 @@ class AuthenticationService extends core_1.AuthenticationBase {
|
|
|
109
98
|
* @param id The JWT to remove or null
|
|
110
99
|
* @param params Service call parameters
|
|
111
100
|
*/
|
|
112
|
-
remove(id, params) {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
return this.authenticate(authentication, params, ...authStrategies);
|
|
122
|
-
});
|
|
101
|
+
async remove(id, params) {
|
|
102
|
+
const { authentication } = params;
|
|
103
|
+
const { authStrategies } = this.configuration;
|
|
104
|
+
// When an id is passed it is expected to be the authentication `accessToken`
|
|
105
|
+
if (id !== null && id !== authentication.accessToken) {
|
|
106
|
+
throw new errors_1.NotAuthenticated('Invalid access token');
|
|
107
|
+
}
|
|
108
|
+
debug('Verifying authentication strategy in remove');
|
|
109
|
+
return this.authenticate(authentication, params, ...authStrategies);
|
|
123
110
|
}
|
|
124
111
|
/**
|
|
125
112
|
* Validates the service configuration.
|
|
126
113
|
*/
|
|
127
|
-
setup() {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
114
|
+
async setup() {
|
|
115
|
+
await super.setup();
|
|
116
|
+
// The setup method checks for valid settings and registers the
|
|
117
|
+
// connection and event (login, logout) hooks
|
|
118
|
+
const { secret, service, entity, entityId } = this.configuration;
|
|
119
|
+
if (typeof secret !== 'string') {
|
|
120
|
+
throw new Error("A 'secret' must be provided in your authentication configuration");
|
|
121
|
+
}
|
|
122
|
+
if (entity !== null) {
|
|
123
|
+
if (service === undefined) {
|
|
124
|
+
throw new Error("The 'service' option is not set in the authentication configuration");
|
|
134
125
|
}
|
|
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
|
-
}
|
|
126
|
+
if (this.app.service(service) === undefined) {
|
|
127
|
+
throw new Error(`The '${service}' entity service does not exist (set to 'null' if it is not required)`);
|
|
145
128
|
}
|
|
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);
|
|
129
|
+
if (this.app.service(service).id === undefined && entityId === undefined) {
|
|
130
|
+
throw new Error(`The '${service}' service does not have an 'id' property and no 'entityId' option is set.`);
|
|
157
131
|
}
|
|
132
|
+
}
|
|
133
|
+
this.hooks({
|
|
134
|
+
create: [(0, schema_1.resolveDispatch)(), (0, hooks_1.connection)('login'), (0, hooks_1.event)('login')],
|
|
135
|
+
remove: [(0, schema_1.resolveDispatch)(), (0, hooks_1.connection)('logout'), (0, hooks_1.event)('logout')]
|
|
136
|
+
});
|
|
137
|
+
this.app.on('disconnect', async (connection) => {
|
|
138
|
+
await this.handleConnection('disconnect', connection);
|
|
158
139
|
});
|
|
140
|
+
if (typeof this.publish === 'function') {
|
|
141
|
+
this.publish(() => null);
|
|
142
|
+
}
|
|
159
143
|
}
|
|
160
144
|
}
|
|
161
145
|
exports.AuthenticationService = AuthenticationService;
|
package/lib/service.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../src/service.ts"],"names":[],"mappings":"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],"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.30",
|
|
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,27 @@
|
|
|
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.30",
|
|
57
|
+
"@feathersjs/errors": "^5.0.0-pre.30",
|
|
58
|
+
"@feathersjs/feathers": "^5.0.0-pre.30",
|
|
59
|
+
"@feathersjs/schema": "^5.0.0-pre.30",
|
|
60
|
+
"@feathersjs/transport-commons": "^5.0.0-pre.30",
|
|
61
|
+
"@types/jsonwebtoken": "^8.5.9",
|
|
60
62
|
"jsonwebtoken": "^8.5.1",
|
|
61
63
|
"lodash": "^4.17.21",
|
|
62
64
|
"long-timeout": "^0.1.1",
|
|
63
|
-
"uuid": "^
|
|
65
|
+
"uuid": "^9.0.0"
|
|
64
66
|
},
|
|
65
67
|
"devDependencies": {
|
|
66
|
-
"@feathersjs/
|
|
67
|
-
"@types/
|
|
68
|
-
"@types/
|
|
69
|
-
"@types/
|
|
70
|
-
"@types/
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"typescript": "^4.2.4"
|
|
68
|
+
"@feathersjs/memory": "^5.0.0-pre.30",
|
|
69
|
+
"@types/lodash": "^4.14.186",
|
|
70
|
+
"@types/mocha": "^10.0.0",
|
|
71
|
+
"@types/node": "^18.8.2",
|
|
72
|
+
"@types/uuid": "^8.3.4",
|
|
73
|
+
"mocha": "^10.0.0",
|
|
74
|
+
"shx": "^0.3.4",
|
|
75
|
+
"ts-node": "^10.9.1",
|
|
76
|
+
"typescript": "^4.8.4"
|
|
76
77
|
},
|
|
77
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "b535c91197f4b997520e0a0e608793eeba791931"
|
|
78
79
|
}
|