@smartsoft001/auth-shell-app-services 2.153.0 → 2.155.0
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smartsoft001/auth-shell-app-services",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.155.0",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"typings": "./src/index.d.ts",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"@nestjs/common": "^11.1.5",
|
|
24
24
|
"@nestjs/core": "^11.2.1",
|
|
25
|
-
"@smartsoft001/auth-domain": "2.
|
|
25
|
+
"@smartsoft001/auth-domain": "2.155.0",
|
|
26
26
|
"express": "^5.2.1"
|
|
27
27
|
},
|
|
28
28
|
"types": "./src/index.d.ts"
|
|
@@ -6,7 +6,10 @@ export declare class AuthService {
|
|
|
6
6
|
private moduleRef;
|
|
7
7
|
constructor(factory: TokenFactory, moduleRef: ModuleRef);
|
|
8
8
|
create(req: IAuthTokenRequest, httpReq?: Request): Promise<IAuthToken>;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
/**
|
|
10
|
+
* The providers are optional extension points: a host that does not
|
|
11
|
+
* register one gets the factory's built-in behaviour, so "not found" is
|
|
12
|
+
* `undefined`, not an error.
|
|
13
|
+
*/
|
|
14
|
+
private getProvider;
|
|
12
15
|
}
|
|
@@ -17,43 +17,24 @@ let AuthService = AuthService_1 = class AuthService {
|
|
|
17
17
|
return this.factory.create({
|
|
18
18
|
httpReq: httpReq,
|
|
19
19
|
request: req,
|
|
20
|
-
payloadProvider: this.
|
|
21
|
-
validationProvider: this.
|
|
22
|
-
userProvider: this.
|
|
20
|
+
payloadProvider: this.getProvider(auth_domain_1.AUTH_TOKEN_PAYLOAD_PROVIDER),
|
|
21
|
+
validationProvider: this.getProvider(auth_domain_1.AUTH_TOKEN_VALIDATION_PROVIDER),
|
|
22
|
+
userProvider: this.getProvider(auth_domain_1.AUTH_TOKEN_USER_PROVIDER),
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
|
-
|
|
25
|
+
/**
|
|
26
|
+
* The providers are optional extension points: a host that does not
|
|
27
|
+
* register one gets the factory's built-in behaviour, so "not found" is
|
|
28
|
+
* `undefined`, not an error.
|
|
29
|
+
*/
|
|
30
|
+
getProvider(token) {
|
|
26
31
|
try {
|
|
27
|
-
return this.moduleRef.get(
|
|
28
|
-
strict: false,
|
|
29
|
-
});
|
|
32
|
+
return this.moduleRef.get(token, { strict: false });
|
|
30
33
|
}
|
|
31
34
|
catch (e) {
|
|
32
|
-
common_1.Logger.debug(e.message, AuthService_1.name);
|
|
35
|
+
common_1.Logger.debug(e instanceof Error ? e.message : String(e), AuthService_1.name);
|
|
33
36
|
}
|
|
34
|
-
return
|
|
35
|
-
}
|
|
36
|
-
getValidationProvider() {
|
|
37
|
-
try {
|
|
38
|
-
return this.moduleRef.get(auth_domain_1.AUTH_TOKEN_VALIDATION_PROVIDER, {
|
|
39
|
-
strict: false,
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
catch (e) {
|
|
43
|
-
common_1.Logger.debug(e.message, AuthService_1.name);
|
|
44
|
-
}
|
|
45
|
-
return null;
|
|
46
|
-
}
|
|
47
|
-
getUserProvider() {
|
|
48
|
-
try {
|
|
49
|
-
return this.moduleRef.get(auth_domain_1.AUTH_TOKEN_USER_PROVIDER, {
|
|
50
|
-
strict: false,
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
catch (e) {
|
|
54
|
-
common_1.Logger.debug(e.message, AuthService_1.name);
|
|
55
|
-
}
|
|
56
|
-
return null;
|
|
37
|
+
return undefined;
|
|
57
38
|
}
|
|
58
39
|
};
|
|
59
40
|
exports.AuthService = AuthService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.service.js","sourceRoot":"","sources":["../../../../../../../../../packages/auth/shell/app-services/src/lib/services/auth/auth.service.ts"],"names":[],"mappings":";;;;;AAAA,2CAAoD;AACpD,uCAAyC;AAGzC,2DAUmC;AAG5B,IAAM,WAAW,mBAAjB,MAAM,WAAW;IAEZ;IACA;IAFV,YACU,OAAqB,EACrB,SAAoB;QADpB,YAAO,GAAP,OAAO,CAAc;QACrB,cAAS,GAAT,SAAS,CAAW;IAC3B,CAAC;IAEJ,MAAM,CAAC,GAAsB,EAAE,OAAiB;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;YACzB,OAAO,EAAE,OAAO;YAChB,OAAO,EAAE,GAAG;YACZ,eAAe,EAAE,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"auth.service.js","sourceRoot":"","sources":["../../../../../../../../../packages/auth/shell/app-services/src/lib/services/auth/auth.service.ts"],"names":[],"mappings":";;;;;AAAA,2CAAoD;AACpD,uCAAyC;AAGzC,2DAUmC;AAG5B,IAAM,WAAW,mBAAjB,MAAM,WAAW;IAEZ;IACA;IAFV,YACU,OAAqB,EACrB,SAAoB;QADpB,YAAO,GAAP,OAAO,CAAc;QACrB,cAAS,GAAT,SAAS,CAAW;IAC3B,CAAC;IAEJ,MAAM,CAAC,GAAsB,EAAE,OAAiB;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;YACzB,OAAO,EAAE,OAAO;YAChB,OAAO,EAAE,GAAG;YACZ,eAAe,EAAE,IAAI,CAAC,WAAW,CAC/B,yCAA2B,CAC5B;YACD,kBAAkB,EAAE,IAAI,CAAC,WAAW,CAClC,4CAA8B,CAC/B;YACD,YAAY,EAAE,IAAI,CAAC,WAAW,CAC5B,sCAAwB,CACzB;SACF,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACK,WAAW,CAAI,KAAa;QAClC,IAAI,CAAC;YACH,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAI,KAAK,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;QACzD,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,eAAM,CAAC,KAAK,CACV,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAC1C,aAAW,CAAC,IAAI,CACjB,CAAC;QACJ,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;CACF,CAAA;AAtCY,kCAAW;sBAAX,WAAW;IADvB,IAAA,mBAAU,GAAE;6CAGQ,0BAAY;QACV,gBAAS;GAHnB,WAAW,CAsCvB"}
|