@alfresco/adf-core 8.4.0-18161598994 → 8.4.0-18196544992

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.
@@ -39,6 +39,7 @@ export declare enum AppConfigValues {
39
39
  AUTH_WITH_CREDENTIALS = "auth.withCredentials",
40
40
  APPLICATION = "application",
41
41
  STORAGE_PREFIX = "application.storagePrefix",
42
+ LINKED_STORAGE_AUTH_PREFIX = "application.linkedStorageAuthPrefix",
42
43
  NOTIFY_DURATION = "notificationDefaultDuration",
43
44
  CONTENT_TICKET_STORAGE_LABEL = "ticket-ECM",
44
45
  PROCESS_TICKET_STORAGE_LABEL = "ticket-BPM",
@@ -18,5 +18,11 @@ import { InjectionToken } from '@angular/core';
18
18
  export interface AuthModuleConfig {
19
19
  readonly useHash: boolean;
20
20
  preventClearHashAfterLogin?: boolean;
21
+ /**
22
+ * Enable cross-application authentication synchronization.
23
+ * When enabled, authentication state will be synchronized across applications
24
+ * running on the same domain with different localStorage prefixes.
25
+ */
26
+ enableCrossAppSync?: boolean;
21
27
  }
22
28
  export declare const AUTH_MODULE_CONFIG: InjectionToken<AuthModuleConfig>;
@@ -27,6 +27,8 @@ export * from './services/identity-group.service';
27
27
  export * from './services/jwt-helper.service';
28
28
  export * from './services/oauth2.service';
29
29
  export * from './services/user-access.service';
30
+ export * from './services/cross-app-auth-sync.service';
31
+ export * from './services/cross-app-auth-integration.service';
30
32
  export * from './basic-auth/basic-alfresco-auth.service';
31
33
  export * from './basic-auth/process-auth';
32
34
  export * from './basic-auth/content-auth';
@@ -0,0 +1,33 @@
1
+ import { CrossAppAuthSyncService, CrossAppAuthConfig } from './cross-app-auth-sync.service';
2
+ import * as i0 from "@angular/core";
3
+ export declare class CrossAppAuthIntegrationService {
4
+ private readonly redirectAuthService;
5
+ private readonly crossAppSyncService;
6
+ private currentAppPrefix;
7
+ /**
8
+ * Initialize cross-application authentication synchronization
9
+ *
10
+ * @param config Configuration for cross-app sync. If not provided, reads from app.config.json
11
+ * @param currentAppPrefix The prefix for the current application
12
+ */
13
+ initialize(config?: CrossAppAuthConfig, currentAppPrefix?: string): Promise<void>;
14
+ /**
15
+ * Check if user is authenticated in another app and attempt silent login
16
+ * Uses OAuth prompt=none for true silent authentication
17
+ *
18
+ * @returns Promise resolving to true if silent login was attempted
19
+ */
20
+ attemptSilentLoginFromLinkedApps(): Promise<boolean>;
21
+ /**
22
+ * Clear authentication tokens from all configured applications
23
+ */
24
+ clearTokensFromAllApps(): void;
25
+ /**
26
+ * Get the underlying sync service for advanced usage
27
+ *
28
+ * @returns The CrossAppAuthSyncService instance
29
+ */
30
+ getSyncService(): CrossAppAuthSyncService;
31
+ static ɵfac: i0.ɵɵFactoryDeclaration<CrossAppAuthIntegrationService, never>;
32
+ static ɵprov: i0.ɵɵInjectableDeclaration<CrossAppAuthIntegrationService>;
33
+ }
@@ -0,0 +1,37 @@
1
+ import * as i0 from "@angular/core";
2
+ export interface CrossAppAuthConfig {
3
+ appPrefixes?: string[];
4
+ }
5
+ export declare class CrossAppAuthSyncService {
6
+ private readonly appConfigService;
7
+ private appPrefixes;
8
+ /**
9
+ * Initialize cross-app authentication synchronization
10
+ *
11
+ * @param config Configuration containing app prefixes. If not provided, reads from app.config.json
12
+ */
13
+ initialize(config?: CrossAppAuthConfig): Promise<void>;
14
+ /**
15
+ * Check if any linked application has authentication tokens
16
+ * This indicates the user is likely authenticated with the identity provider
17
+ *
18
+ * @param excludePrefix Optional prefix to exclude from the check (current app)
19
+ * @returns true if tokens are found in any linked app storage
20
+ */
21
+ hasAuthTokensInLinkedApps(excludePrefix?: string): boolean;
22
+ /**
23
+ * Clear authentication tokens from all configured prefixes
24
+ * Called when user explicitly logs out
25
+ */
26
+ clearTokensFromAllApps(): void;
27
+ /**
28
+ * Get the current sync configuration
29
+ *
30
+ * @returns Current app prefixes configuration
31
+ */
32
+ getConfiguration(): string[];
33
+ private buildStorageKey;
34
+ private getConfiguredPrefixes;
35
+ static ɵfac: i0.ɵɵFactoryDeclaration<CrossAppAuthSyncService, never>;
36
+ static ɵprov: i0.ɵɵInjectableDeclaration<CrossAppAuthSyncService>;
37
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@alfresco/adf-core",
3
3
  "description": "Alfresco ADF core",
4
- "version": "8.4.0-18161598994",
4
+ "version": "8.4.0-18196544992",
5
5
  "author": "Hyland Software, Inc. and its affiliates",
6
6
  "repository": {
7
7
  "type": "git",
@@ -63,8 +63,8 @@
63
63
  "@angular/router": ">=16.0.0",
64
64
  "@mat-datetimepicker/core": ">=12.0.1",
65
65
  "@ngx-translate/core": ">=16.0.0",
66
- "@alfresco/js-api": ">=9.4.0-18161598994",
67
- "@alfresco/adf-extensions": ">=8.4.0-18161598994",
66
+ "@alfresco/js-api": ">=9.4.0-18196544992",
67
+ "@alfresco/adf-extensions": ">=8.4.0-18196544992",
68
68
  "minimatch": ">=10.0.0",
69
69
  "pdfjs-dist": ">=3.3.122"
70
70
  },