From 6b45bc2b9616fc289a5d378e9eca56ed84a1b66e Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Wed, 22 May 2024 09:16:12 -0400 Subject: [PATCH] Fix OidcAuthenticationService export (#9711) * fix import * fix service location and exports --- .../src/lib/auth/guard/auth-guard-base.ts | 2 +- .../auth/guard/auth-guard-bpm.service.spec.ts | 2 +- .../lib/auth/guard/auth-guard-bpm.service.ts | 21 +++++++------- .../auth/guard/auth-guard-ecm.service.spec.ts | 2 +- .../lib/auth/guard/auth-guard-ecm.service.ts | 24 +++++++-------- .../lib/auth/guard/auth-guard.service.spec.ts | 2 +- .../src/lib/auth/guard/auth-guard.service.ts | 28 +++++++++--------- lib/core/src/lib/auth/index.ts | 1 - .../oidc-authentication.service.spec.ts | 3 +- .../oidc-authentication.service.ts | 8 ++--- lib/core/src/lib/auth/oidc/public-api.ts | 1 + lib/core/src/lib/auth/public-api.ts | 3 +- .../services/authentication.service.spec.ts | 2 +- .../auth/services/authentication.service.ts | 29 ++++++------------- .../login-dialog-panel.component.spec.ts | 2 +- .../components/login/login.component.spec.ts | 2 +- .../login/components/login/login.component.ts | 2 +- .../directives/login-footer.directive.spec.ts | 2 +- .../directives/login-header.directive.spec.ts | 2 +- lib/core/src/public-api.ts | 1 - ...ttach-file-widget-dialog.component.spec.ts | 3 +- 21 files changed, 65 insertions(+), 77 deletions(-) rename lib/core/src/lib/auth/{services => oidc}/oidc-authentication.service.spec.ts (98%) rename lib/core/src/lib/auth/{services => oidc}/oidc-authentication.service.ts (96%) diff --git a/lib/core/src/lib/auth/guard/auth-guard-base.ts b/lib/core/src/lib/auth/guard/auth-guard-base.ts index 44268dc8d8..63f3456a26 100644 --- a/lib/core/src/lib/auth/guard/auth-guard-base.ts +++ b/lib/core/src/lib/auth/guard/auth-guard-base.ts @@ -23,7 +23,7 @@ import { MatDialog } from '@angular/material/dialog'; import { StorageService } from '../../common/services/storage.service'; import { Observable } from 'rxjs'; import { BasicAlfrescoAuthService } from '../basic-auth/basic-alfresco-auth.service'; -import { OidcAuthenticationService } from '../services/oidc-authentication.service'; +import { OidcAuthenticationService } from '../oidc/oidc-authentication.service'; export abstract class AuthGuardBase implements CanActivate, CanActivateChild { protected get withCredentials(): boolean { diff --git a/lib/core/src/lib/auth/guard/auth-guard-bpm.service.spec.ts b/lib/core/src/lib/auth/guard/auth-guard-bpm.service.spec.ts index 5e9383bf04..b4c60d1467 100644 --- a/lib/core/src/lib/auth/guard/auth-guard-bpm.service.spec.ts +++ b/lib/core/src/lib/auth/guard/auth-guard-bpm.service.spec.ts @@ -23,7 +23,7 @@ import { RouterStateSnapshot, Router } from '@angular/router'; import { CoreTestingModule } from '../../testing/core.testing.module'; import { MatDialog } from '@angular/material/dialog'; import { BasicAlfrescoAuthService } from '../basic-auth/basic-alfresco-auth.service'; -import { OidcAuthenticationService } from '../services/oidc-authentication.service'; +import { OidcAuthenticationService } from '../oidc/oidc-authentication.service'; describe('AuthGuardService BPM', () => { let authGuard: AuthGuardBpm; diff --git a/lib/core/src/lib/auth/guard/auth-guard-bpm.service.ts b/lib/core/src/lib/auth/guard/auth-guard-bpm.service.ts index b3aa2f819b..eb575e3cbd 100644 --- a/lib/core/src/lib/auth/guard/auth-guard-bpm.service.ts +++ b/lib/core/src/lib/auth/guard/auth-guard-bpm.service.ts @@ -23,21 +23,22 @@ import { AuthGuardBase } from './auth-guard-base'; import { MatDialog } from '@angular/material/dialog'; import { StorageService } from '../../common/services/storage.service'; import { BasicAlfrescoAuthService } from '../basic-auth/basic-alfresco-auth.service'; -import { OidcAuthenticationService } from '../services/oidc-authentication.service'; +import { OidcAuthenticationService } from '../oidc/oidc-authentication.service'; @Injectable({ providedIn: 'root' }) export class AuthGuardBpm extends AuthGuardBase { - - constructor(authenticationService: AuthenticationService, - basicAlfrescoAuthService: BasicAlfrescoAuthService, - oidcAuthenticationService: OidcAuthenticationService, - router: Router, - appConfigService: AppConfigService, - dialog: MatDialog, - storageService: StorageService) { - super(authenticationService,basicAlfrescoAuthService, oidcAuthenticationService,router, appConfigService, dialog, storageService); + constructor( + authenticationService: AuthenticationService, + basicAlfrescoAuthService: BasicAlfrescoAuthService, + oidcAuthenticationService: OidcAuthenticationService, + router: Router, + appConfigService: AppConfigService, + dialog: MatDialog, + storageService: StorageService + ) { + super(authenticationService, basicAlfrescoAuthService, oidcAuthenticationService, router, appConfigService, dialog, storageService); } async checkLogin(_: ActivatedRouteSnapshot, redirectUrl: string): Promise { diff --git a/lib/core/src/lib/auth/guard/auth-guard-ecm.service.spec.ts b/lib/core/src/lib/auth/guard/auth-guard-ecm.service.spec.ts index 051965be50..acc8c1459c 100644 --- a/lib/core/src/lib/auth/guard/auth-guard-ecm.service.spec.ts +++ b/lib/core/src/lib/auth/guard/auth-guard-ecm.service.spec.ts @@ -22,7 +22,7 @@ import { AuthenticationService } from '../services/authentication.service'; import { RouterStateSnapshot, Router } from '@angular/router'; import { CoreTestingModule } from '../../testing/core.testing.module'; import { MatDialog } from '@angular/material/dialog'; -import { OidcAuthenticationService } from '../services/oidc-authentication.service'; +import { OidcAuthenticationService } from '../oidc/oidc-authentication.service'; import { BasicAlfrescoAuthService } from '../basic-auth/basic-alfresco-auth.service'; describe('AuthGuardService ECM', () => { diff --git a/lib/core/src/lib/auth/guard/auth-guard-ecm.service.ts b/lib/core/src/lib/auth/guard/auth-guard-ecm.service.ts index ab5d6229fe..d5bdf482e5 100644 --- a/lib/core/src/lib/auth/guard/auth-guard-ecm.service.ts +++ b/lib/core/src/lib/auth/guard/auth-guard-ecm.service.ts @@ -16,30 +16,28 @@ */ import { Injectable } from '@angular/core'; -import { - ActivatedRouteSnapshot, Router, UrlTree -} from '@angular/router'; +import { ActivatedRouteSnapshot, Router, UrlTree } from '@angular/router'; import { AuthenticationService } from '../services/authentication.service'; import { AppConfigService } from '../../app-config/app-config.service'; import { AuthGuardBase } from './auth-guard-base'; import { MatDialog } from '@angular/material/dialog'; import { StorageService } from '../../common/services/storage.service'; import { BasicAlfrescoAuthService } from '../basic-auth/basic-alfresco-auth.service'; -import { OidcAuthenticationService } from '../services/oidc-authentication.service'; - +import { OidcAuthenticationService } from '../oidc/oidc-authentication.service'; @Injectable({ providedIn: 'root' }) export class AuthGuardEcm extends AuthGuardBase { - - constructor(authenticationService: AuthenticationService, - basicAlfrescoAuthService: BasicAlfrescoAuthService, - oidcAuthenticationService: OidcAuthenticationService, - router: Router, - appConfigService: AppConfigService, - dialog: MatDialog, - storageService: StorageService) { + constructor( + authenticationService: AuthenticationService, + basicAlfrescoAuthService: BasicAlfrescoAuthService, + oidcAuthenticationService: OidcAuthenticationService, + router: Router, + appConfigService: AppConfigService, + dialog: MatDialog, + storageService: StorageService + ) { super(authenticationService, basicAlfrescoAuthService, oidcAuthenticationService, router, appConfigService, dialog, storageService); } diff --git a/lib/core/src/lib/auth/guard/auth-guard.service.spec.ts b/lib/core/src/lib/auth/guard/auth-guard.service.spec.ts index 318b7578e7..6615c80ec8 100644 --- a/lib/core/src/lib/auth/guard/auth-guard.service.spec.ts +++ b/lib/core/src/lib/auth/guard/auth-guard.service.spec.ts @@ -22,7 +22,7 @@ import { AuthGuard } from './auth-guard.service'; import { AuthenticationService } from '../services/authentication.service'; import { CoreTestingModule } from '../../testing/core.testing.module'; import { StorageService } from '../../common/services/storage.service'; -import { OidcAuthenticationService } from '../services/oidc-authentication.service'; +import { OidcAuthenticationService } from '../oidc/oidc-authentication.service'; import { BasicAlfrescoAuthService } from '../basic-auth/basic-alfresco-auth.service'; describe('AuthGuardService', () => { diff --git a/lib/core/src/lib/auth/guard/auth-guard.service.ts b/lib/core/src/lib/auth/guard/auth-guard.service.ts index 0ad38b5c3b..62d9bcef2b 100644 --- a/lib/core/src/lib/auth/guard/auth-guard.service.ts +++ b/lib/core/src/lib/auth/guard/auth-guard.service.ts @@ -24,24 +24,24 @@ import { JwtHelperService } from '../services/jwt-helper.service'; import { MatDialog } from '@angular/material/dialog'; import { StorageService } from '../../common/services/storage.service'; import { BasicAlfrescoAuthService } from '../basic-auth/basic-alfresco-auth.service'; -import { OidcAuthenticationService } from '../services/oidc-authentication.service'; - +import { OidcAuthenticationService } from '../oidc/oidc-authentication.service'; @Injectable({ providedIn: 'root' }) export class AuthGuard extends AuthGuardBase { - ticketChangeBind: any; - constructor(private jwtHelperService: JwtHelperService, - authenticationService: AuthenticationService, - basicAlfrescoAuthService: BasicAlfrescoAuthService, - oidcAuthenticationService: OidcAuthenticationService, - router: Router, - appConfigService: AppConfigService, - dialog: MatDialog, - storageService: StorageService) { + constructor( + private jwtHelperService: JwtHelperService, + authenticationService: AuthenticationService, + basicAlfrescoAuthService: BasicAlfrescoAuthService, + oidcAuthenticationService: OidcAuthenticationService, + router: Router, + appConfigService: AppConfigService, + dialog: MatDialog, + storageService: StorageService + ) { super(authenticationService, basicAlfrescoAuthService, oidcAuthenticationService, router, appConfigService, dialog, storageService); this.ticketChangeBind = this.ticketChange.bind(this); @@ -57,9 +57,11 @@ export class AuthGuard extends AuthGuardBase { this.ticketChangeRedirect(event); } - if (event.key.endsWith(JwtHelperService.USER_ACCESS_TOKEN) && + if ( + event.key.endsWith(JwtHelperService.USER_ACCESS_TOKEN) && this.jwtHelperService.getValueFromToken(event.newValue, JwtHelperService.USER_PREFERRED_USERNAME) !== - this.jwtHelperService.getValueFromToken(event.oldValue, JwtHelperService.USER_PREFERRED_USERNAME)) { + this.jwtHelperService.getValueFromToken(event.oldValue, JwtHelperService.USER_PREFERRED_USERNAME) + ) { this.ticketChangeRedirect(event); } } diff --git a/lib/core/src/lib/auth/index.ts b/lib/core/src/lib/auth/index.ts index af12ddc7e2..54beb1a252 100644 --- a/lib/core/src/lib/auth/index.ts +++ b/lib/core/src/lib/auth/index.ts @@ -16,4 +16,3 @@ */ export * from './public-api'; -export * from './oidc/public-api'; diff --git a/lib/core/src/lib/auth/services/oidc-authentication.service.spec.ts b/lib/core/src/lib/auth/oidc/oidc-authentication.service.spec.ts similarity index 98% rename from lib/core/src/lib/auth/services/oidc-authentication.service.spec.ts rename to lib/core/src/lib/auth/oidc/oidc-authentication.service.spec.ts index c182a4bbc7..a6fbadb23a 100644 --- a/lib/core/src/lib/auth/services/oidc-authentication.service.spec.ts +++ b/lib/core/src/lib/auth/oidc/oidc-authentication.service.spec.ts @@ -19,7 +19,7 @@ import { TestBed } from '@angular/core/testing'; import { OidcAuthenticationService } from './oidc-authentication.service'; import { OAuthService, OAuthStorage } from 'angular-oauth2-oidc'; import { AppConfigService, AuthService } from '@alfresco/adf-core'; -import { AUTH_MODULE_CONFIG } from '../oidc/auth-config'; +import { AUTH_MODULE_CONFIG } from './auth-config'; interface MockAppConfigOAuth2 { oauth2: { @@ -46,7 +46,6 @@ class MockAppConfigService { } } - class MockOAuthService { clientId = 'testClientId'; redirectUri = 'testRedirectUri'; diff --git a/lib/core/src/lib/auth/services/oidc-authentication.service.ts b/lib/core/src/lib/auth/oidc/oidc-authentication.service.ts similarity index 96% rename from lib/core/src/lib/auth/services/oidc-authentication.service.ts rename to lib/core/src/lib/auth/oidc/oidc-authentication.service.ts index ec444eafe7..f9e8562e49 100644 --- a/lib/core/src/lib/auth/services/oidc-authentication.service.ts +++ b/lib/core/src/lib/auth/oidc/oidc-authentication.service.ts @@ -21,11 +21,11 @@ import { Observable, defer, EMPTY } from 'rxjs'; import { catchError, map } from 'rxjs/operators'; import { AppConfigService, AppConfigValues } from '../../app-config/app-config.service'; import { OauthConfigModel } from '../models/oauth-config.model'; -import { BaseAuthenticationService } from './base-authentication.service'; +import { BaseAuthenticationService } from '../services/base-authentication.service'; import { CookieService } from '../../common/services/cookie.service'; -import { JwtHelperService } from './jwt-helper.service'; -import { AuthConfigService } from '../oidc/auth-config.service'; -import { AuthService } from '../oidc/auth.service'; +import { JwtHelperService } from '../services/jwt-helper.service'; +import { AuthConfigService } from './auth-config.service'; +import { AuthService } from './auth.service'; import { Minimatch } from 'minimatch'; import { HttpHeaders } from '@angular/common/http'; diff --git a/lib/core/src/lib/auth/oidc/public-api.ts b/lib/core/src/lib/auth/oidc/public-api.ts index 45f4d8f49f..969076ddb2 100644 --- a/lib/core/src/lib/auth/oidc/public-api.ts +++ b/lib/core/src/lib/auth/oidc/public-api.ts @@ -21,3 +21,4 @@ export * from './auth.service'; export * from './oidc-auth.guard'; export * from './redirect-auth.service'; export * from './view/authentication-confirmation/authentication-confirmation.component'; +export * from './oidc-authentication.service'; diff --git a/lib/core/src/lib/auth/public-api.ts b/lib/core/src/lib/auth/public-api.ts index 98808c6cf0..ceeda1f08b 100644 --- a/lib/core/src/lib/auth/public-api.ts +++ b/lib/core/src/lib/auth/public-api.ts @@ -30,7 +30,6 @@ export * from './services/identity-group.service'; export * from './services/jwt-helper.service'; export * from './services/oauth2.service'; export * from './services/user-access.service'; -export * from './services/oidc-authentication.service'; export * from './basic-auth/basic-alfresco-auth.service'; export * from './basic-auth/process-auth'; @@ -49,3 +48,5 @@ export * from './models/identity-role.model'; export * from './models/user-access.model'; export * from './models/application-access.model'; + +export * from './oidc/public-api'; diff --git a/lib/core/src/lib/auth/services/authentication.service.spec.ts b/lib/core/src/lib/auth/services/authentication.service.spec.ts index 1a3cd6c956..b1c88e94ee 100644 --- a/lib/core/src/lib/auth/services/authentication.service.spec.ts +++ b/lib/core/src/lib/auth/services/authentication.service.spec.ts @@ -22,7 +22,7 @@ import { AppConfigService } from '../../app-config/app-config.service'; import { setupTestBed } from '../../testing/setup-test-bed'; import { CoreTestingModule } from '../../testing/core.testing.module'; import { BasicAlfrescoAuthService } from '../basic-auth/basic-alfresco-auth.service'; -import { OidcAuthenticationService } from './oidc-authentication.service'; +import { OidcAuthenticationService } from '../oidc/oidc-authentication.service'; declare let jasmine: any; diff --git a/lib/core/src/lib/auth/services/authentication.service.ts b/lib/core/src/lib/auth/services/authentication.service.ts index 2c7cafa53f..fb247f1429 100644 --- a/lib/core/src/lib/auth/services/authentication.service.ts +++ b/lib/core/src/lib/auth/services/authentication.service.ts @@ -16,7 +16,7 @@ */ import { Injectable, Injector } from '@angular/core'; -import { OidcAuthenticationService } from './oidc-authentication.service'; +import { OidcAuthenticationService } from '../oidc/oidc-authentication.service'; import { BasicAlfrescoAuthService } from '../basic-auth/basic-alfresco-auth.service'; import { Observable, Subject, from } from 'rxjs'; import { HttpHeaders } from '@angular/common/http'; @@ -28,30 +28,18 @@ import { RedirectAuthService } from '../oidc/redirect-auth.service'; providedIn: 'root' }) export class AuthenticationService implements AuthenticationServiceInterface, ee.Emitter { - onLogin: Subject = new Subject(); onLogout: Subject = new Subject(); - constructor( - private injector: Injector, - private redirectAuthService: RedirectAuthService - ) { - this.redirectAuthService.onLogin.subscribe( - (value) => this.onLogin.next(value) - ); + constructor(private injector: Injector, private redirectAuthService: RedirectAuthService) { + this.redirectAuthService.onLogin.subscribe((value) => this.onLogin.next(value)); - this.basicAlfrescoAuthService.onLogin.subscribe( - (value) => this.onLogin.next(value) - ); + this.basicAlfrescoAuthService.onLogin.subscribe((value) => this.onLogin.next(value)); if (this.isOauth()) { - this.oidcAuthenticationService.onLogout.subscribe( - (value) => this.onLogout.next(value) - ); + this.oidcAuthenticationService.onLogout.subscribe((value) => this.onLogout.next(value)); } else { - this.basicAlfrescoAuthService.onLogout.subscribe( - (value) => this.onLogout.next(value) - ); + this.basicAlfrescoAuthService.onLogout.subscribe((value) => this.onLogout.next(value)); } } @@ -76,7 +64,9 @@ export class AuthenticationService implements AuthenticationServiceInterface, ee } addTokenToHeader(requestUrl: string, headersArg?: HttpHeaders): Observable { - return this.isOauth() ? this.oidcAuthenticationService.addTokenToHeader(requestUrl, headersArg) : this.basicAlfrescoAuthService.addTokenToHeader(requestUrl, headersArg); + return this.isOauth() + ? this.oidcAuthenticationService.addTokenToHeader(requestUrl, headersArg) + : this.basicAlfrescoAuthService.addTokenToHeader(requestUrl, headersArg); } isECMProvider(): boolean { @@ -205,5 +195,4 @@ export class AuthenticationService implements AuthenticationServiceInterface, ee isKerberosEnabled(): boolean { return !this.isOauth() ? this.basicAlfrescoAuthService.isKerberosEnabled() : false; } - } diff --git a/lib/core/src/lib/login/components/login-dialog-panel/login-dialog-panel.component.spec.ts b/lib/core/src/lib/login/components/login-dialog-panel/login-dialog-panel.component.spec.ts index 039ce55ae5..a0b4d11c45 100644 --- a/lib/core/src/lib/login/components/login-dialog-panel/login-dialog-panel.component.spec.ts +++ b/lib/core/src/lib/login/components/login-dialog-panel/login-dialog-panel.component.spec.ts @@ -18,7 +18,7 @@ import { BasicAlfrescoAuthService, CoreTestingModule, LoginDialogPanelComponent } from '@alfresco/adf-core'; import { ComponentFixture, TestBed } from '@angular/core/testing'; import { of } from 'rxjs'; -import { OidcAuthenticationService } from '../../../auth/services/oidc-authentication.service'; +import { OidcAuthenticationService } from '../../../auth/oidc/oidc-authentication.service'; describe('LoginDialogPanelComponent', () => { let component: LoginDialogPanelComponent; diff --git a/lib/core/src/lib/login/components/login/login.component.spec.ts b/lib/core/src/lib/login/components/login/login.component.spec.ts index c16ff8dca6..0301105d56 100644 --- a/lib/core/src/lib/login/components/login/login.component.spec.ts +++ b/lib/core/src/lib/login/components/login/login.component.spec.ts @@ -29,7 +29,7 @@ import { Validators } from '@angular/forms'; import { Router } from '@angular/router'; import { EMPTY, of, throwError } from 'rxjs'; -import { OidcAuthenticationService } from '../../../auth/services/oidc-authentication.service'; +import { OidcAuthenticationService } from '../../../auth/oidc/oidc-authentication.service'; import { LoginComponent } from './login.component'; describe('LoginComponent', () => { diff --git a/lib/core/src/lib/login/components/login/login.component.ts b/lib/core/src/lib/login/components/login/login.component.ts index cf35ab6143..5e05209be0 100644 --- a/lib/core/src/lib/login/components/login/login.component.ts +++ b/lib/core/src/lib/login/components/login/login.component.ts @@ -31,7 +31,7 @@ import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; import { AppConfigService, AppConfigValues } from '../../../app-config'; import { AuthenticationService, BasicAlfrescoAuthService } from '../../../auth'; -import { OidcAuthenticationService } from '../../../auth/services/oidc-authentication.service'; +import { OidcAuthenticationService } from '../../../auth/oidc/oidc-authentication.service'; import { UserPreferencesService } from '../../../common'; import { TranslationService } from '../../../translation'; diff --git a/lib/core/src/lib/login/directives/login-footer.directive.spec.ts b/lib/core/src/lib/login/directives/login-footer.directive.spec.ts index e1cedf4410..4b8bb1c0d9 100644 --- a/lib/core/src/lib/login/directives/login-footer.directive.spec.ts +++ b/lib/core/src/lib/login/directives/login-footer.directive.spec.ts @@ -17,7 +17,7 @@ import { CoreTestingModule, LoginComponent, LoginFooterDirective } from '@alfresco/adf-core'; import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { OidcAuthenticationService } from '../../auth/services/oidc-authentication.service'; +import { OidcAuthenticationService } from '../../auth/oidc/oidc-authentication.service'; describe('LoginFooterDirective', () => { let fixture: ComponentFixture; diff --git a/lib/core/src/lib/login/directives/login-header.directive.spec.ts b/lib/core/src/lib/login/directives/login-header.directive.spec.ts index 52e2428796..38338e16c1 100644 --- a/lib/core/src/lib/login/directives/login-header.directive.spec.ts +++ b/lib/core/src/lib/login/directives/login-header.directive.spec.ts @@ -17,7 +17,7 @@ import { CoreTestingModule, LoginComponent, LoginHeaderDirective } from '@alfresco/adf-core'; import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { OidcAuthenticationService } from '../../auth/services/oidc-authentication.service'; +import { OidcAuthenticationService } from '../../auth/oidc/oidc-authentication.service'; describe('LoginHeaderDirective', () => { let fixture: ComponentFixture; diff --git a/lib/core/src/public-api.ts b/lib/core/src/public-api.ts index 5bb07fce9f..474ba0fc1b 100644 --- a/lib/core/src/public-api.ts +++ b/lib/core/src/public-api.ts @@ -59,4 +59,3 @@ export * from './lib/common'; export * from './lib/material.module'; export * from './lib/core.module'; -export { AuthModule } from './lib/auth/oidc/auth.module'; diff --git a/lib/process-services/src/lib/form/widgets/content-widget/attach-file-widget-dialog.component.spec.ts b/lib/process-services/src/lib/form/widgets/content-widget/attach-file-widget-dialog.component.spec.ts index 8544090c6c..7f33ed10e1 100644 --- a/lib/process-services/src/lib/form/widgets/content-widget/attach-file-widget-dialog.component.spec.ts +++ b/lib/process-services/src/lib/form/widgets/content-widget/attach-file-widget-dialog.component.spec.ts @@ -21,12 +21,11 @@ import { ContentModule, ContentNodeSelectorPanelComponent, DocumentListService, import { EventEmitter, NO_ERRORS_SCHEMA } from '@angular/core'; import { ProcessTestingModule } from '../../../testing/process.testing.module'; import { AttachFileWidgetDialogComponent } from './attach-file-widget-dialog.component'; -import { AlfrescoApiService, BasicAlfrescoAuthService } from '@alfresco/adf-core'; +import { AlfrescoApiService, BasicAlfrescoAuthService, OidcAuthenticationService } from '@alfresco/adf-core'; import { AttachFileWidgetDialogComponentData } from './attach-file-widget-dialog-component.interface'; import { of, throwError } from 'rxjs'; import { By } from '@angular/platform-browser'; import { Node, SiteEntry, NodeEntry, SitePaging, SitePagingList } from '@alfresco/js-api'; -import { OidcAuthenticationService } from 'lib/core/src/lib/auth/services/oidc-authentication.service'; describe('AttachFileWidgetDialogComponent', () => { let widget: AttachFileWidgetDialogComponent;