diff --git a/ng2-components/ng2-alfresco-core/src/services/AlfrescoAuthenticationECM.service.ts b/ng2-components/ng2-alfresco-core/src/services/AlfrescoAuthenticationECM.service.ts index d1d8b21cff..1a8266eee4 100644 --- a/ng2-components/ng2-alfresco-core/src/services/AlfrescoAuthenticationECM.service.ts +++ b/ng2-components/ng2-alfresco-core/src/services/AlfrescoAuthenticationECM.service.ts @@ -72,7 +72,7 @@ export class AlfrescoAuthenticationECM extends AlfrescoAuthenticationBase implem return Observable.fromPromise(this.callApiLogin(username, password)) .map((response: any) => { - return {type: this.TYPE, ticket: response.entry.id}; + return {type: this.TYPE, ticket: response}; }) .catch(this.handleError); } diff --git a/ng2-components/ng2-alfresco-core/src/services/AlfrescoAuthenticationService.service.spec.ts b/ng2-components/ng2-alfresco-core/src/services/AlfrescoAuthenticationService.service.spec.ts index 32903dbc43..3ec6b1a0aa 100644 --- a/ng2-components/ng2-alfresco-core/src/services/AlfrescoAuthenticationService.service.spec.ts +++ b/ng2-components/ng2-alfresco-core/src/services/AlfrescoAuthenticationService.service.spec.ts @@ -33,12 +33,9 @@ describe('AlfrescoAuthentication', () => { service; fakePromiseECM = new Promise(function (resolve, reject) { - resolve({ - entry: { - userId: 'fake-username', - id: 'fake-post-ticket-ECM' - } - }); + resolve( + 'fake-post-ticket-ECM' + ); reject({ response: { error: 'fake-error'