<?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 webclient action repository credentials in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/webclient-action-repository-credentials/m-p/70974#M45901</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm tying to write a web client action using JCR. I managed to get the repository bean in my ActionExecuterAbstractBase derived class by adding a JCR.Repository bean reference in my model-context file and adding a setter method for the bean.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is that I don't know how to login to the repository with the current user's credentials!? Can it be done or do I have to use a predefined login credentials?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I use the foundation API in my action it doesn't need to login.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas, please?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Sep 2006 13:36:31 GMT</pubDate>
    <dc:creator>smola</dc:creator>
    <dc:date>2006-09-04T13:36:31Z</dc:date>
    <item>
      <title>webclient action repository credentials</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/webclient-action-repository-credentials/m-p/70974#M45901</link>
      <description>Hi,I'm tying to write a web client action using JCR. I managed to get the repository bean in my ActionExecuterAbstractBase derived class by adding a JCR.Repository bean reference in my model-context file and adding a setter method for the bean.The problem is that I don't know how to login to the rep</description>
      <pubDate>Mon, 04 Sep 2006 13:36:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/webclient-action-repository-credentials/m-p/70974#M45901</guid>
      <dc:creator>smola</dc:creator>
      <dc:date>2006-09-04T13:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: webclient action repository credentials</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/webclient-action-repository-credentials/m-p/70975#M45902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;How'd you go with this? I thought I'd have a play with JCR from an existing customisation of the web-client, but can't figure out how to login using the existing user stored in the authenticationService.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Sep 2006 07:11:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/webclient-action-repository-credentials/m-p/70975#M45902</guid>
      <dc:creator>marcus</dc:creator>
      <dc:date>2006-09-19T07:11:21Z</dc:date>
    </item>
    <item>
      <title>Re: webclient action repository credentials</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/webclient-action-repository-credentials/m-p/70976#M45903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The JCR spec. requires a login call in order to get a JCR Session.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Right now, there isn't a way to JCR login using the currently authenticated user via the JCR public interface.&amp;nbsp; You can raise a JIRA feature request if you want this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, there is a backdoor approach - I haven't tried it personally, but it should work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;SessionImpl sessionImpl = new org.alfresco.jcr.session((RepositoryImpl)repository);&lt;BR /&gt;sessionImpl.init(authenticationService.getCurrentTicket(), "SpacesStore", null);&lt;BR /&gt;Session session = (Session)sessionImpl;&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;The above code assumes you have injected JCR.Repository into 'repository' and AuthenticationService into 'authenticationService'.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There is no need to call session.logout().&amp;nbsp; In fact, you shouldn't in this scenario.&amp;nbsp; Also, all calls to session will inherit the currently open transaction.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Sep 2006 14:34:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/webclient-action-repository-credentials/m-p/70976#M45903</guid>
      <dc:creator>davidc</dc:creator>
      <dc:date>2006-09-27T14:34:11Z</dc:date>
    </item>
  </channel>
</rss>

