some fix for usernames

This commit is contained in:
eromano
2023-08-31 10:27:08 +02:00
parent 6efdf1c671
commit 18051d6b29
3 changed files with 12 additions and 4 deletions
@@ -300,11 +300,11 @@ export class BasicAlfrescoAuthService extends BaseAuthenticationService {
}
getBpmUsername(): string {
return this.contentAuth.authentications.basicAuth.username;
return this.processAuth.getUsername();
}
getEcmUsername(): string {
return this.processAuth.authentications.basicAuth.username;
return this.contentAuth.getUsername();
}
/**
@@ -79,6 +79,10 @@ export class ContentAuth {
this.storageService.setItem('ACS_USERNAME', username);
}
getUsername() {
return this.storageService.getItem('ACS_USERNAME');
}
/**
* login Alfresco API
* @param username: // Username to login
@@ -64,6 +64,10 @@ export class ProcessAuth {
this.storageService.setItem('APS_USERNAME', username);
}
getUsername() {
return this.storageService.getItem('APS_USERNAME');
}
/**
* login Activiti API
* @param username: // Username to login
@@ -166,7 +170,7 @@ export class ProcessAuth {
* @param ticket
* */
setTicket(ticket: string) {
if(ticket && ticket !=='null') {
if (ticket && ticket !== 'null') {
this.authentications.basicAuth.ticket = ticket;
this.authentications.basicAuth.password = null;
this.config.ticketBpm = ticket;
@@ -188,7 +192,7 @@ export class ProcessAuth {
* Get the current Ticket
* */
getToken(): string {
if(!this.ticket){
if (!this.ticket) {
this.onError.next('error');
return null;
}