[ADF-3938] support for XMLHttpRequest.withCredentials flag (#4190)

* support XMLHttpRequest.withCredentials

* proper defaults and json schema updates

* remove outdated docs

* remove empty declaration from app config

* fix blob support
This commit is contained in:
Denys Vuika
2019-01-25 12:12:06 +00:00
committed by Eugenio Romano
parent 08c9b6d117
commit 5887fa1052
6 changed files with 69 additions and 32 deletions

View File

@@ -117,7 +117,7 @@ export class AlfrescoApiService {
oauth.redirectUriLogout = window.location.origin + (oauth.redirectUriLogout || '/');
}
const config = {
const config = new AlfrescoApiConfig({
provider: this.appConfig.get<string>(AppConfigValues.PROVIDERS),
hostEcm: this.appConfig.get<string>(AppConfigValues.ECMHOST),
hostBpm: this.appConfig.get<string>(AppConfigValues.BPMHOST),
@@ -125,8 +125,9 @@ export class AlfrescoApiService {
contextRootBpm: this.appConfig.get<string>(AppConfigValues.CONTEXTROOTBPM),
contextRoot: this.appConfig.get<string>(AppConfigValues.CONTEXTROOTECM),
disableCsrf: this.appConfig.get<boolean>(AppConfigValues.DISABLECSRF),
withCredentials: this.appConfig.get<boolean>(AppConfigValues.AUTH_WITH_CREDENTIALS, false),
oauth2: oauth
};
});
if (this.alfrescoApi && this.isDifferentConfig(this.lastConfig, config)) {
this.lastConfig = config;
@@ -135,6 +136,7 @@ export class AlfrescoApiService {
this.lastConfig = config;
this.alfrescoApi = new AlfrescoApiCompatibility(config);
}
}
isDifferentConfig(lastConfig: AlfrescoApiConfig, newConfig: AlfrescoApiConfig) {