@open-rlb/ng-app 3.1.93 → 3.1.94
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.
|
@@ -1538,6 +1538,8 @@ class AuthenticationService {
|
|
|
1538
1538
|
this.aclStore = inject(AclStore);
|
|
1539
1539
|
this._authReady$ = new ReplaySubject(1);
|
|
1540
1540
|
this.authReady$ = this._authReady$.asObservable();
|
|
1541
|
+
this._authenticated$ = new ReplaySubject(1);
|
|
1542
|
+
this.authenticated$ = this._authenticated$.asObservable();
|
|
1541
1543
|
this.logger = this.log.for(this.constructor.name);
|
|
1542
1544
|
this.logger.log('AuthenticationService initialized');
|
|
1543
1545
|
}
|
|
@@ -1564,7 +1566,12 @@ class AuthenticationService {
|
|
|
1564
1566
|
return this.aclStore.loadACL(undefined).pipe(map(() => responses));
|
|
1565
1567
|
}
|
|
1566
1568
|
}), tap({
|
|
1567
|
-
next: () =>
|
|
1569
|
+
next: (responses) => {
|
|
1570
|
+
this._authReady$.next();
|
|
1571
|
+
if (responses.some(r => r.isAuthenticated)) {
|
|
1572
|
+
this._authenticated$.next();
|
|
1573
|
+
}
|
|
1574
|
+
},
|
|
1568
1575
|
error: () => this._authReady$.next(),
|
|
1569
1576
|
}));
|
|
1570
1577
|
}
|