@loopback/authentication-jwt 0.12.2 → 0.12.3
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.
|
@@ -18,15 +18,13 @@ let UserRepository = class UserRepository extends repository_1.DefaultCrudReposi
|
|
|
18
18
|
this.registerInclusionResolver('userCredentials', this.userCredentials.inclusionResolver);
|
|
19
19
|
}
|
|
20
20
|
async findCredentials(userId) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
if (err.code === 'ENTITY_NOT_FOUND') {
|
|
21
|
+
return this.userCredentials(userId)
|
|
22
|
+
.get()
|
|
23
|
+
.catch(err => {
|
|
24
|
+
if (err.code === 'ENTITY_NOT_FOUND')
|
|
26
25
|
return undefined;
|
|
27
|
-
}
|
|
28
26
|
throw err;
|
|
29
|
-
}
|
|
27
|
+
});
|
|
30
28
|
}
|
|
31
29
|
};
|
|
32
30
|
UserRepository = tslib_1.__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.repository.js","sourceRoot":"","sources":["../../src/repositories/user.repository.ts"],"names":[],"mappings":";AAAA,2EAA2E;AAC3E,4CAA4C;AAC5C,+CAA+C;AAC/C,gEAAgE;;;;AAEhE,yCAA8C;AAC9C,qDAK8B;AAC9B,kCAA4C;AAC5C,sCAA+D;AAG/D,IAAa,cAAc,GAA3B,MAAa,cAAe,SAAQ,kCAInC;IAMC,YAEE,UAA8B,EAEpB,+BAAkE;QAE5E,KAAK,CAAC,aAAI,EAAE,UAAU,CAAC,CAAC;QAFd,oCAA+B,GAA/B,+BAA+B,CAAmC;QAG5E,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,gCAAgC,CAC1D,iBAAiB,EACjB,+BAA+B,CAChC,CAAC;QACF,IAAI,CAAC,yBAAyB,CAC5B,iBAAiB,EACjB,IAAI,CAAC,eAAe,CAAC,iBAAiB,CACvC,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,eAAe,CACnB,MAAgC;QAEhC,
|
|
1
|
+
{"version":3,"file":"user.repository.js","sourceRoot":"","sources":["../../src/repositories/user.repository.ts"],"names":[],"mappings":";AAAA,2EAA2E;AAC3E,4CAA4C;AAC5C,+CAA+C;AAC/C,gEAAgE;;;;AAEhE,yCAA8C;AAC9C,qDAK8B;AAC9B,kCAA4C;AAC5C,sCAA+D;AAG/D,IAAa,cAAc,GAA3B,MAAa,cAAe,SAAQ,kCAInC;IAMC,YAEE,UAA8B,EAEpB,+BAAkE;QAE5E,KAAK,CAAC,aAAI,EAAE,UAAU,CAAC,CAAC;QAFd,oCAA+B,GAA/B,+BAA+B,CAAmC;QAG5E,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,gCAAgC,CAC1D,iBAAiB,EACjB,+BAA+B,CAChC,CAAC;QACF,IAAI,CAAC,yBAAyB,CAC5B,iBAAiB,EACjB,IAAI,CAAC,eAAe,CAAC,iBAAiB,CACvC,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,eAAe,CACnB,MAAgC;QAEhC,OAAO,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC;aAChC,GAAG,EAAE;aACL,KAAK,CAAC,GAAG,CAAC,EAAE;YACX,IAAI,GAAG,CAAC,IAAI,KAAK,kBAAkB;gBAAE,OAAO,SAAS,CAAC;YACtD,MAAM,GAAG,CAAC;QACZ,CAAC,CAAC,CAAC;IACP,CAAC;CACF,CAAA;AArCY,cAAc;IAWtB,mBAAA,IAAA,aAAM,EAAC,eAAe,0BAAmB,CAAC,eAAe,EAAE,CAAC,CAAA;IAE5D,mBAAA,uBAAU,CAAC,MAAM,CAAC,2BAA2B,CAAC,CAAA;6CADnC,oBAAO,CAAC,UAAU;GAZrB,cAAc,CAqC1B;AArCY,wCAAc"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loopback/authentication-jwt",
|
|
3
3
|
"description": "Extension for the prototype of JWT authentication",
|
|
4
|
-
"version": "0.12.
|
|
4
|
+
"version": "0.12.3",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"LoopBack",
|
|
7
7
|
"Authentication",
|
|
@@ -37,33 +37,33 @@
|
|
|
37
37
|
"!*/__tests__"
|
|
38
38
|
],
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"@loopback/authentication": "^9.0.
|
|
41
|
-
"@loopback/core": "^4.0.
|
|
42
|
-
"@loopback/rest": "^12.0.
|
|
40
|
+
"@loopback/authentication": "^9.0.3",
|
|
41
|
+
"@loopback/core": "^4.0.3",
|
|
42
|
+
"@loopback/rest": "^12.0.3"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@loopback/security": "^0.8.
|
|
45
|
+
"@loopback/security": "^0.8.3",
|
|
46
46
|
"@types/bcryptjs": "2.4.2",
|
|
47
47
|
"bcryptjs": "^2.4.3",
|
|
48
48
|
"debug": "^4.3.4",
|
|
49
49
|
"jsonwebtoken": "^8.5.1"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@loopback/authentication": "^9.0.
|
|
53
|
-
"@loopback/boot": "^5.0.
|
|
54
|
-
"@loopback/build": "^9.0.
|
|
55
|
-
"@loopback/core": "^4.0.
|
|
56
|
-
"@loopback/eslint-config": "^13.0.
|
|
57
|
-
"@loopback/repository": "^5.0.
|
|
58
|
-
"@loopback/rest": "^12.0.
|
|
59
|
-
"@loopback/rest-explorer": "^5.0.
|
|
60
|
-
"@loopback/service-proxy": "^5.0.
|
|
61
|
-
"@loopback/testlab": "^5.0.
|
|
52
|
+
"@loopback/authentication": "^9.0.3",
|
|
53
|
+
"@loopback/boot": "^5.0.3",
|
|
54
|
+
"@loopback/build": "^9.0.3",
|
|
55
|
+
"@loopback/core": "^4.0.3",
|
|
56
|
+
"@loopback/eslint-config": "^13.0.3",
|
|
57
|
+
"@loopback/repository": "^5.0.3",
|
|
58
|
+
"@loopback/rest": "^12.0.3",
|
|
59
|
+
"@loopback/rest-explorer": "^5.0.3",
|
|
60
|
+
"@loopback/service-proxy": "^5.0.3",
|
|
61
|
+
"@loopback/testlab": "^5.0.3",
|
|
62
62
|
"@types/debug": "^4.1.7",
|
|
63
|
-
"@types/lodash": "^4.14.
|
|
64
|
-
"@types/node": "^14.18.
|
|
63
|
+
"@types/lodash": "^4.14.184",
|
|
64
|
+
"@types/node": "^14.18.26",
|
|
65
65
|
"lodash": "^4.17.21",
|
|
66
66
|
"typescript": "~4.7.4"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "296d9a9577fd058d1a2b2386087686cefa65a7a9"
|
|
69
69
|
}
|
|
@@ -44,13 +44,11 @@ export class UserRepository extends DefaultCrudRepository<
|
|
|
44
44
|
async findCredentials(
|
|
45
45
|
userId: typeof User.prototype.id,
|
|
46
46
|
): Promise<UserCredentials | undefined> {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
throw err;
|
|
54
|
-
}
|
|
47
|
+
return this.userCredentials(userId)
|
|
48
|
+
.get()
|
|
49
|
+
.catch(err => {
|
|
50
|
+
if (err.code === 'ENTITY_NOT_FOUND') return undefined;
|
|
51
|
+
throw err;
|
|
52
|
+
});
|
|
55
53
|
}
|
|
56
54
|
}
|