mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
return base 64 ticket
This commit is contained in:
@@ -36,8 +36,8 @@ export class AlfrescoAuthenticationService {
|
|||||||
constructor(public alfrescoSetting: AlfrescoSettingsService) {
|
constructor(public alfrescoSetting: AlfrescoSettingsService) {
|
||||||
this.alfrescoApi = new AlfrescoApi({
|
this.alfrescoApi = new AlfrescoApi({
|
||||||
provider: this.alfrescoSetting.getProviders(),
|
provider: this.alfrescoSetting.getProviders(),
|
||||||
ticketEcm: localStorage.getItem('ticket-ECM'),
|
ticketEcm: this.getTicketEcm(),
|
||||||
ticketBpm: localStorage.getItem('ticket-BPM'),
|
ticketBpm: this.getTicketBpm(),
|
||||||
hostEcm: this.alfrescoSetting.ecmHost,
|
hostEcm: this.alfrescoSetting.ecmHost,
|
||||||
hostBpm: this.alfrescoSetting.bpmHost
|
hostBpm: this.alfrescoSetting.bpmHost
|
||||||
});
|
});
|
||||||
@@ -127,7 +127,7 @@ export class AlfrescoAuthenticationService {
|
|||||||
*/
|
*/
|
||||||
public getTicketEcm(): string {
|
public getTicketEcm(): string {
|
||||||
if (localStorage.getItem('ticket-ECM')) {
|
if (localStorage.getItem('ticket-ECM')) {
|
||||||
return 'Basic ' + btoa(localStorage.getItem('ticket-ECM'));
|
return localStorage.getItem('ticket-ECM');
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -145,6 +145,14 @@ export class AlfrescoAuthenticationService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public getTicketEcmBase64(): string {
|
||||||
|
if (localStorage.getItem('ticket-ECM')) {
|
||||||
|
return 'Basic ' + btoa(localStorage.getItem('ticket-ECM'));
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The method save the ECM and BPM ticket in the localStorage
|
* The method save the ECM and BPM ticket in the localStorage
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user