<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: using alfresco-js-api in the browser, I can only login using the ecm-ticket in the constructor in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/using-alfresco-js-api-in-the-browser-i-can-only-login-using-the/m-p/1875#M11</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Francesco,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I obtain the ticket through a alfresco web-script that returns a javascript object (template):&lt;/P&gt;&lt;P&gt;alfUserData={&lt;BR /&gt; "ticket":"${sessionticket.ticket}",&lt;BR /&gt; "firstName":"${person.properties.firstName}",&lt;BR /&gt; "lastName":"${person.properties.lastName}", &lt;BR /&gt; "userName":"${person.properties.userName}",&lt;BR /&gt; "email":"${person.properties.email}"&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is loaded as script before the angularJs app and called via wcs to use the configured SSO mechanism.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #808080;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;script&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;src&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"alfresco/wcs/autoticket"&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;&amp;gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;script&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so I avoid the fiddling with the asynchrony and I have a valid global (initial) ticket before starting the next javascript. &amp;nbsp;&lt;/P&gt;&lt;P&gt;But when using the loginTicket(ticket)&amp;nbsp;there is an internal-error on calling the "loginTicket" method:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;alfresco-js-api.min.js:6 OPTIONS &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://127.0.0.1:8080/alfresco/api/-default-/public/authentication/versions/1/tickets/-me-" rel="nofollow noopener noreferrer" target="_blank"&gt;http://127.0.0.1:8080/alfresco/api/-default-/public/authentication/versions/1/tickets/-me-&lt;/A&gt;&lt;SPAN&gt; 401 (Unauthorized)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Calling the constructor with the ticket is ok. But I fear I really missunderstood something.&lt;/P&gt;&lt;P&gt;I have to say, in this case I'm not on nodeJs, it's just a SPA hosted on the alfresco site.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...and now I see alfresco-js-api.min.js is calling the host &lt;A href="http://127.0.0.1:8080" rel="nofollow noopener noreferrer"&gt;http://127.0.0.1:8080&lt;/A&gt;&amp;nbsp; but it should call &lt;A href="http://dms" rel="nofollow noopener noreferrer"&gt;http://dms&lt;/A&gt;&amp;nbsp;- and because I also run an alfresco locally this gives the unauthorized error - the ticket is not valid for another alfresco system &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But everything is initialized with url &lt;A href="http://dms" rel="nofollow noopener noreferrer"&gt;http://dms&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;- is &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://127.0.0.1:8080" rel="nofollow noopener noreferrer" target="_blank"&gt;http://127.0.0.1:8080&lt;/A&gt;&lt;SPAN&gt; hardcoded in the js-api or am I missing just the ecmhost parameter...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Didn't recognize the&amp;nbsp;&lt;/SPAN&gt;wrong 127.0.0.1 before...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Happy Office hours&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Apr 2017 13:47:07 GMT</pubDate>
    <dc:creator>mehe</dc:creator>
    <dc:date>2017-04-03T13:47:07Z</dc:date>
    <item>
      <title>using alfresco-js-api in the browser, I can only login using the ecm-ticket in the constructor</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/using-alfresco-js-api-in-the-browser-i-can-only-login-using-the/m-p/1873#M9</link>
      <description>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&amp;nbsp;var ticket="XXXXXXXXXXXXX"; //valid ticket insidevar alfrescoApiInst = new AlfrescoApi({ provider:'ECM' });alfrescoApiInst.loginTicket(ticket).then(function (</description>
      <pubDate>Mon, 03 Apr 2017 11:54:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/using-alfresco-js-api-in-the-browser-i-can-only-login-using-the/m-p/1873#M9</guid>
      <dc:creator>mehe</dc:creator>
      <dc:date>2017-04-03T11:54:37Z</dc:date>
    </item>
    <item>
      <title>Re: using alfresco-js-api in the browser, I can only login using the ecm-ticket in the constructor</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/using-alfresco-js-api-in-the-browser-i-can-only-login-using-the/m-p/1874#M10</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Martin,&lt;/P&gt;&lt;P&gt;Which is the error you get?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Apr 2017 13:25:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/using-alfresco-js-api-in-the-browser-i-can-only-login-using-the/m-p/1874#M10</guid>
      <dc:creator>fcorti</dc:creator>
      <dc:date>2017-04-03T13:25:51Z</dc:date>
    </item>
    <item>
      <title>Re: using alfresco-js-api in the browser, I can only login using the ecm-ticket in the constructor</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/using-alfresco-js-api-in-the-browser-i-can-only-login-using-the/m-p/1875#M11</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Francesco,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I obtain the ticket through a alfresco web-script that returns a javascript object (template):&lt;/P&gt;&lt;P&gt;alfUserData={&lt;BR /&gt; "ticket":"${sessionticket.ticket}",&lt;BR /&gt; "firstName":"${person.properties.firstName}",&lt;BR /&gt; "lastName":"${person.properties.lastName}", &lt;BR /&gt; "userName":"${person.properties.userName}",&lt;BR /&gt; "email":"${person.properties.email}"&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is loaded as script before the angularJs app and called via wcs to use the configured SSO mechanism.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #808080;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;script&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;src&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"alfresco/wcs/autoticket"&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;&amp;gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;script&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so I avoid the fiddling with the asynchrony and I have a valid global (initial) ticket before starting the next javascript. &amp;nbsp;&lt;/P&gt;&lt;P&gt;But when using the loginTicket(ticket)&amp;nbsp;there is an internal-error on calling the "loginTicket" method:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;alfresco-js-api.min.js:6 OPTIONS &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://127.0.0.1:8080/alfresco/api/-default-/public/authentication/versions/1/tickets/-me-" rel="nofollow noopener noreferrer" target="_blank"&gt;http://127.0.0.1:8080/alfresco/api/-default-/public/authentication/versions/1/tickets/-me-&lt;/A&gt;&lt;SPAN&gt; 401 (Unauthorized)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Calling the constructor with the ticket is ok. But I fear I really missunderstood something.&lt;/P&gt;&lt;P&gt;I have to say, in this case I'm not on nodeJs, it's just a SPA hosted on the alfresco site.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...and now I see alfresco-js-api.min.js is calling the host &lt;A href="http://127.0.0.1:8080" rel="nofollow noopener noreferrer"&gt;http://127.0.0.1:8080&lt;/A&gt;&amp;nbsp; but it should call &lt;A href="http://dms" rel="nofollow noopener noreferrer"&gt;http://dms&lt;/A&gt;&amp;nbsp;- and because I also run an alfresco locally this gives the unauthorized error - the ticket is not valid for another alfresco system &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But everything is initialized with url &lt;A href="http://dms" rel="nofollow noopener noreferrer"&gt;http://dms&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;- is &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://127.0.0.1:8080" rel="nofollow noopener noreferrer" target="_blank"&gt;http://127.0.0.1:8080&lt;/A&gt;&lt;SPAN&gt; hardcoded in the js-api or am I missing just the ecmhost parameter...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Didn't recognize the&amp;nbsp;&lt;/SPAN&gt;wrong 127.0.0.1 before...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Happy Office hours&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Apr 2017 13:47:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/using-alfresco-js-api-in-the-browser-i-can-only-login-using-the/m-p/1875#M11</guid>
      <dc:creator>mehe</dc:creator>
      <dc:date>2017-04-03T13:47:07Z</dc:date>
    </item>
    <item>
      <title>Re: using alfresco-js-api in the browser, I can only login using the ecm-ticket in the constructor</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/using-alfresco-js-api-in-the-browser-i-can-only-login-using-the/m-p/1876#M12</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;now I get&amp;nbsp;&lt;/P&gt;&lt;P&gt;"errorKey":"Ticket base authentication required.","statusCode":400,"briefSummary":"03030007 Ticket base authentication required."&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Apr 2017 14:19:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/using-alfresco-js-api-in-the-browser-i-can-only-login-using-the/m-p/1876#M12</guid>
      <dc:creator>mehe</dc:creator>
      <dc:date>2017-04-03T14:19:37Z</dc:date>
    </item>
    <item>
      <title>Re: using alfresco-js-api in the browser, I can only login using the ecm-ticket in the constructor</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/using-alfresco-js-api-in-the-browser-i-can-only-login-using-the/m-p/1877#M13</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Martin,&lt;/P&gt;&lt;P&gt;I opened an issue for you :&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://github.com/Alfresco/alfresco-js-api/issues/209" title="https://github.com/Alfresco/alfresco-js-api/issues/209" rel="nofollow noopener noreferrer"&gt;loginTicket(ticket) 400 response · Issue #209 · Alfresco/alfresco-js-api · GitHub&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please refer to it for further update.&lt;/P&gt;&lt;P&gt;In the meantime, I suggest you use constructor way.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Apr 2017 10:14:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/using-alfresco-js-api-in-the-browser-i-can-only-login-using-the/m-p/1877#M13</guid>
      <dc:creator>eugenio_romano</dc:creator>
      <dc:date>2017-04-04T10:14:29Z</dc:date>
    </item>
    <item>
      <title>Re: using alfresco-js-api in the browser, I can only login using the ecm-ticket in the constructor</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/using-alfresco-js-api-in-the-browser-i-can-only-login-using-the/m-p/1878#M14</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eugenio,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you very much &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Apr 2017 10:20:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/using-alfresco-js-api-in-the-browser-i-can-only-login-using-the/m-p/1878#M14</guid>
      <dc:creator>mehe</dc:creator>
      <dc:date>2017-04-04T10:20:11Z</dc:date>
    </item>
    <item>
      <title>Re: using alfresco-js-api in the browser, I can only login using the ecm-ticket in the constructor</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/using-alfresco-js-api-in-the-browser-i-can-only-login-using-the/m-p/1879#M15</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Martin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The team released the ADF 1.3 LA few hours ago with the bugfix to this problem included.&lt;BR /&gt;&lt;A class="link-titled" href="https://github.com/Alfresco/alfresco-ng2-components/releases/tag/1.3.0" title="https://github.com/Alfresco/alfresco-ng2-components/releases/tag/1.3.0" rel="nofollow noopener noreferrer"&gt;Release 1.3.0 · Alfresco/alfresco-ng2-components · GitHub&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe you are interested to the JS-API release note.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://github.com/Alfresco/alfresco-js-api/releases/tag/1.3.0" title="https://github.com/Alfresco/alfresco-js-api/releases/tag/1.3.0" rel="nofollow noopener noreferrer"&gt;Release 1.3.0 · Alfresco/alfresco-js-api · GitHub&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check it out!&lt;BR /&gt;(and many thanks to the team)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Apr 2017 12:30:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/using-alfresco-js-api-in-the-browser-i-can-only-login-using-the/m-p/1879#M15</guid>
      <dc:creator>fcorti</dc:creator>
      <dc:date>2017-04-05T12:30:42Z</dc:date>
    </item>
    <item>
      <title>Re: using alfresco-js-api in the browser, I can only login using the ecm-ticket in the constructor</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/using-alfresco-js-api-in-the-browser-i-can-only-login-using-the/m-p/1880#M16</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Francesco and Eugenio,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;no more login problems with the 1.3.0 Release&amp;nbsp;&lt;IMG src="https://connect.hyland.com/legacyfs/online/alfresco/emoticons/check.png" /&gt;&amp;nbsp;The issue is resolved. That was fast&amp;nbsp;&lt;IMG src="https://connect.hyland.com/legacyfs/online/alfresco/emoticons/shocked.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much (the whole team)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Apr 2017 15:10:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/using-alfresco-js-api-in-the-browser-i-can-only-login-using-the/m-p/1880#M16</guid>
      <dc:creator>mehe</dc:creator>
      <dc:date>2017-04-05T15:10:49Z</dc:date>
    </item>
  </channel>
</rss>

