mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ACS-6748] BasicAlfrescoAuthService.requireAlfTicket should not be in adf/core (#9393)
This commit is contained in:
committed by
GitHub
parent
255f472b39
commit
325eef1c32
@@ -20,7 +20,6 @@ import { Injectable } from '@angular/core';
|
||||
import { AppConfigService, AppConfigValues } from '../app-config/app-config.service';
|
||||
import { AlfrescoApiService } from '../services/alfresco-api.service';
|
||||
import { StorageService } from '../common/services/storage.service';
|
||||
import { AuthenticationService, BasicAlfrescoAuthService } from '../auth';
|
||||
|
||||
/**
|
||||
* Create a factory to resolve an api service instance
|
||||
@@ -38,20 +37,11 @@ export function createAlfrescoApiInstance(angularAlfrescoApiService: AlfrescoApi
|
||||
export class AlfrescoApiLoaderService {
|
||||
constructor(private readonly appConfig: AppConfigService,
|
||||
private readonly apiService: AlfrescoApiService,
|
||||
private readonly basicAlfrescoAuthService: BasicAlfrescoAuthService,
|
||||
private readonly authService: AuthenticationService,
|
||||
private storageService: StorageService) {
|
||||
}
|
||||
|
||||
async init(): Promise<any> {
|
||||
await this.appConfig.load();
|
||||
|
||||
this.authService.onLogin.subscribe(async () => {
|
||||
if (this.authService.isOauth() && (this.authService.isALLProvider() || this.authService.isECMProvider())) {
|
||||
await this.basicAlfrescoAuthService.requireAlfTicket();
|
||||
}
|
||||
});
|
||||
|
||||
return this.initAngularAlfrescoApi();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user