@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.js
CHANGED
|
@@ -1014,10 +1014,10 @@ var init_gate_keeper = __esm({
|
|
|
1014
1014
|
const guest = GUEST;
|
|
1015
1015
|
if (!Guards12.isNullOrEmpty(token)) {
|
|
1016
1016
|
const authResult = await this._authService.authenticate(token);
|
|
1017
|
-
if (authResult.isOk())
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1017
|
+
if (!authResult.isOk()) return Result14.fail(authResult.getErrorOrThrow());
|
|
1018
|
+
const claims = authResult.getValueOrThrow();
|
|
1019
|
+
if (Guards12.isDefined(claims)) return Result14.ok(this._mapper.map(claims));
|
|
1020
|
+
return Result14.ok(guest);
|
|
1021
1021
|
}
|
|
1022
1022
|
const userResult = await this._authService.getUser();
|
|
1023
1023
|
if (userResult.isOk()) {
|