diff --git a/ng2-components/ng2-alfresco-core/src/services/alfresco-authentication.service.ts b/ng2-components/ng2-alfresco-core/src/services/alfresco-authentication.service.ts index 2ca469958b..e437b0832e 100644 --- a/ng2-components/ng2-alfresco-core/src/services/alfresco-authentication.service.ts +++ b/ng2-components/ng2-alfresco-core/src/services/alfresco-authentication.service.ts @@ -167,6 +167,28 @@ export class AlfrescoAuthenticationService { return this.alfrescoApi.getInstance().bpmAuth && !!this.alfrescoApi.getInstance().bpmAuth.isLoggedIn(); } + /** + * Get the ECM username + * + * @returns {string} The username value + * + * @memberof AlfrescoAuthenticationService + */ + getEcmUsername(): string { + return this.alfrescoApi.getInstance().ecmAuth.username; + } + + /** + * Get the BPM username + * + * @returns {string} The username value + * + * @memberof AlfrescoAuthenticationService + */ + getBpmUsername(): string { + return this.alfrescoApi.getInstance().bpmAuth.username; + } + /** * The method write the error in the console browser * @param error