@alfresco/adf-core 8.4.0-18718684741 → 8.4.0-18726732827

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.
@@ -57,7 +57,7 @@ import * as i7 from '@angular/material/menu';
57
57
  import { MatMenuModule, MatMenuItem, MatMenuTrigger } from '@angular/material/menu';
58
58
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
59
59
  import * as i1$9 from '@angular/router';
60
- import { RouterModule, Router, provideRouter } from '@angular/router';
60
+ import { RouterModule, Router, ActivatedRoute, provideRouter } from '@angular/router';
61
61
  import * as i2$5 from '@angular/material/checkbox';
62
62
  import { MatCheckboxModule } from '@angular/material/checkbox';
63
63
  import * as i1$a from 'angular-oauth2-oidc';
@@ -8764,6 +8764,17 @@ class RedirectAuthService extends AuthService {
8764
8764
  }))
8765
8765
  .then(() => this._getRedirectUrl());
8766
8766
  }
8767
+ getStoredIssuer() {
8768
+ const claims = this.oauthService.getIdentityClaims();
8769
+ return claims?.['iss'] || '';
8770
+ }
8771
+ getStoredSessionId() {
8772
+ const claims = this.oauthService.getIdentityClaims();
8773
+ return claims?.['sid'] || '';
8774
+ }
8775
+ logoutNoRedirect() {
8776
+ this.oauthService.logOut(true);
8777
+ }
8767
8778
  _getRedirectUrl() {
8768
8779
  const DEFAULT_REDIRECT = '/';
8769
8780
  const stateKey = this.oauthService.state;
@@ -10605,6 +10616,58 @@ const OidcAuthGuard = async () => {
10605
10616
  }
10606
10617
  };
10607
10618
 
10619
+ /*!
10620
+ * @license
10621
+ * Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.
10622
+ *
10623
+ * Licensed under the Apache License, Version 2.0 (the "License");
10624
+ * you may not use this file except in compliance with the License.
10625
+ * You may obtain a copy of the License at
10626
+ *
10627
+ * http://www.apache.org/licenses/LICENSE-2.0
10628
+ *
10629
+ * Unless required by applicable law or agreed to in writing, software
10630
+ * distributed under the License is distributed on an "AS IS" BASIS,
10631
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10632
+ * See the License for the specific language governing permissions and
10633
+ * limitations under the License.
10634
+ */
10635
+ class FrontChannelLogoutComponent {
10636
+ constructor() {
10637
+ this.activatedRoute = inject(ActivatedRoute);
10638
+ this.authService = inject(AuthService);
10639
+ }
10640
+ ngOnInit() {
10641
+ const { issuerParam, sessionIdParam } = this.getIssuerAndSessionIdFromRouteParams();
10642
+ const { storedIssuer, storedSessionId } = this.getIssuerAndSessionIdFromAuthService();
10643
+ this.logoutIfIssuerAndSessionIdMatch(storedIssuer, issuerParam, storedSessionId, sessionIdParam);
10644
+ }
10645
+ logoutIfIssuerAndSessionIdMatch(storedIssuer, issuerParam, storedSessionId, sessionIdParam) {
10646
+ const storedIssuerMatchUrlIssuerParam = storedIssuer && issuerParam && storedIssuer === issuerParam;
10647
+ const storedSessionIdMatchUrlSessionIdParam = storedSessionId && sessionIdParam && storedSessionId === sessionIdParam;
10648
+ if (storedIssuerMatchUrlIssuerParam && storedSessionIdMatchUrlSessionIdParam) {
10649
+ this.authService.logoutNoRedirect();
10650
+ }
10651
+ }
10652
+ getIssuerAndSessionIdFromAuthService() {
10653
+ const storedIssuer = this.authService.getStoredIssuer();
10654
+ const storedSessionId = this.authService.getStoredSessionId();
10655
+ return { storedIssuer, storedSessionId };
10656
+ }
10657
+ getIssuerAndSessionIdFromRouteParams() {
10658
+ const queryParamMap = this.activatedRoute.snapshot.queryParamMap;
10659
+ const issuerParam = queryParamMap.get('iss');
10660
+ const sessionIdParam = queryParamMap.get('sid');
10661
+ return { issuerParam, sessionIdParam };
10662
+ }
10663
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: FrontChannelLogoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
10664
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: FrontChannelLogoutComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: '', isInline: true }); }
10665
+ }
10666
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: FrontChannelLogoutComponent, decorators: [{
10667
+ type: Component,
10668
+ args: [{ template: '', standalone: true }]
10669
+ }] });
10670
+
10608
10671
  /*!
10609
10672
  * @license
10610
10673
  * Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.
@@ -10622,7 +10685,8 @@ const OidcAuthGuard = async () => {
10622
10685
  * limitations under the License.
10623
10686
  */
10624
10687
  const AUTH_ROUTES = [
10625
- { path: 'view/authentication-confirmation', component: AuthenticationConfirmationComponent, canActivate: [OidcAuthGuard] }
10688
+ { path: 'view/authentication-confirmation', component: AuthenticationConfirmationComponent, canActivate: [OidcAuthGuard] },
10689
+ { path: 'oidc/frontchannel_logout', component: FrontChannelLogoutComponent }
10626
10690
  ];
10627
10691
 
10628
10692
  /*!