mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Dev alepore 12511 fix bc wrong auth url (#8352)
* [AAE-12511] Wait for the app configuration to be set with the right idp configuration * [AAE-12511] Wait for the api service to be loaded to fix AlfrescoApi instance undefined
This commit is contained in:
@@ -36,7 +36,7 @@ export class AlfrescoApiLoaderService {
|
|||||||
return this.initAngularAlfrescoApi();
|
return this.initAngularAlfrescoApi();
|
||||||
}
|
}
|
||||||
|
|
||||||
private initAngularAlfrescoApi() {
|
private async initAngularAlfrescoApi() {
|
||||||
const oauth: OauthConfigModel = Object.assign({}, this.appConfig.get<OauthConfigModel>(AppConfigValues.OAUTHCONFIG, null));
|
const oauth: OauthConfigModel = Object.assign({}, this.appConfig.get<OauthConfigModel>(AppConfigValues.OAUTHCONFIG, null));
|
||||||
|
|
||||||
if (oauth) {
|
if (oauth) {
|
||||||
@@ -57,6 +57,6 @@ export class AlfrescoApiLoaderService {
|
|||||||
oauth2: oauth
|
oauth2: oauth
|
||||||
});
|
});
|
||||||
|
|
||||||
this.apiService.load(config);
|
await this.apiService.load(config);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -49,7 +49,7 @@ export class AlfrescoApiService {
|
|||||||
this.currentAppConfig = config;
|
this.currentAppConfig = config;
|
||||||
|
|
||||||
if (config.authType === 'OAUTH') {
|
if (config.authType === 'OAUTH') {
|
||||||
this.mapAlfrescoApiOpenIdConfig();
|
await this.mapAlfrescoApiOpenIdConfig();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.initAlfrescoApiWithConfig();
|
this.initAlfrescoApiWithConfig();
|
||||||
@@ -59,7 +59,7 @@ export class AlfrescoApiService {
|
|||||||
async reset() {
|
async reset() {
|
||||||
this.getCurrentAppConfig();
|
this.getCurrentAppConfig();
|
||||||
if (this.currentAppConfig.authType === 'OAUTH') {
|
if (this.currentAppConfig.authType === 'OAUTH') {
|
||||||
this.mapAlfrescoApiOpenIdConfig();
|
await this.mapAlfrescoApiOpenIdConfig();
|
||||||
}
|
}
|
||||||
this.initAlfrescoApiWithConfig();
|
this.initAlfrescoApiWithConfig();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user