04-03-2017 07:54 AM
I'm using an AngularJS (1.6) SPA with the alfresco-js-api directly in the browser.
Thought I should be able to login with a valid ticket using
var ticket="XXXXXXXXXXXXX"; //valid ticket inside
var alfrescoApiInst = new AlfrescoApi({ provider:'ECM' });
alfrescoApiInst.loginTicket(ticket).then(function (data) {
console.log('valid ticket you are logged in');
}, function (error) {
console.error(error);
});
but this is not working.
But using the ticket in the constructor works
var alfrescoApiInst=new AlfrescoApi({ticketEcm:ticket,hostEcm:hostUrl,provider:"ECM"});
It works with the constructor, but did I miss anything or got it totally wrong?
04-04-2017 06:14 AM
Hi Martin,
I opened an issue for you :
loginTicket(ticket) 400 response · Issue #209 · Alfresco/alfresco-js-api · GitHub
please refer to it for further update.
In the meantime, I suggest you use constructor way.
Explore our Alfresco products with the links below. Use labels to filter content by product module.