<?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 Creating alfresco user through Java API in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/creating-alfresco-user-through-java-api/m-p/231794#M184924</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 have a requirement to create an Alfresco user from the external application. Through Java API I need to write a external java class through which i need to create and validate that particular user inside Alfresco repository. Can anyone provide sample for this requirement.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks is advance.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Jul 2010 04:19:31 GMT</pubDate>
    <dc:creator>efycaci_ramesh</dc:creator>
    <dc:date>2010-07-27T04:19:31Z</dc:date>
    <item>
      <title>Creating alfresco user through Java API</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/creating-alfresco-user-through-java-api/m-p/231794#M184924</link>
      <description>Hi,I have a requirement to create an Alfresco user from the external application. Through Java API I need to write a external java class through which i need to create and validate that particular user inside Alfresco repository. Can anyone provide sample for this requirement.Thanks is advance.</description>
      <pubDate>Tue, 27 Jul 2010 04:19:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/creating-alfresco-user-through-java-api/m-p/231794#M184924</guid>
      <dc:creator>efycaci_ramesh</dc:creator>
      <dc:date>2010-07-27T04:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: Creating alfresco user through Java API</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/creating-alfresco-user-through-java-api/m-p/231795#M184925</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'd do this by writing a simple web script. The web script can use either the Java API or the JavaScript API to create a user. Your external app can then make a RESTful call to the web script.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Look at the People API on the Alfresco wiki for an example of how to do it in JavaScript: &lt;/SPAN&gt;&lt;A href="http://wiki.alfresco.com/wiki/3.3_JavaScript_API" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/3.3_JavaScript_API&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In Java, you'd use the AuthenticationService to create the authority:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;authenticationService.createAuthentication(userName, password.toCharArray());&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And the PersonService to create the person:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;personService.createPerson(personProps);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you need help creating a web script, take a look at this tutorial (&lt;/SPAN&gt;&lt;A href="http://ecmarchitect.com/archives/2007/10/25/777" rel="nofollow noopener noreferrer"&gt;http://ecmarchitect.com/archives/2007/10/25/777&lt;/A&gt;&lt;SPAN&gt;) or the Web Scripts page on the Alfresco wiki (&lt;/SPAN&gt;&lt;A href="http://wiki.alfresco.com/wiki/Web_Scripts" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/Web_Scripts&lt;/A&gt;&lt;SPAN&gt;).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Make sure your web script runs as "admin", either by requiring admin-level authentication or using runas (which would be a potential security hole), otherwise your code won't be executed with enough access to create the new user.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jul 2010 16:30:36 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/creating-alfresco-user-through-java-api/m-p/231795#M184925</guid>
      <dc:creator>jpotts</dc:creator>
      <dc:date>2010-07-27T16:30:36Z</dc:date>
    </item>
  </channel>
</rss>

