@xeno-js/core 1.2.10 → 1.2.11
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/README.md +445 -456
- package/dist/index.cjs +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1018,10 +1018,10 @@ var init_gate_keeper = __esm({
|
|
|
1018
1018
|
const guest = import_shared28.GUEST;
|
|
1019
1019
|
if (!import_shared28.Guards.isNullOrEmpty(token)) {
|
|
1020
1020
|
const authResult = await this._authService.authenticate(token);
|
|
1021
|
-
if (authResult.isOk())
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1021
|
+
if (!authResult.isOk()) return import_shared27.Result.fail(authResult.getErrorOrThrow());
|
|
1022
|
+
const claims = authResult.getValueOrThrow();
|
|
1023
|
+
if (import_shared28.Guards.isDefined(claims)) return import_shared27.Result.ok(this._mapper.map(claims));
|
|
1024
|
+
return import_shared27.Result.ok(guest);
|
|
1025
1025
|
}
|
|
1026
1026
|
const userResult = await this._authService.getUser();
|
|
1027
1027
|
if (userResult.isOk()) {
|