<?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 Where is the code that share create a account automatically in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/where-is-the-code-that-share-create-a-account-automatically/m-p/248508#M201638</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;When I configured alfresco share to use passthru SSO authentication, I found when there is no account exist in alfresco, alfresco will create a account with the name automatically when user type:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://localhost:8080/share" rel="nofollow noopener noreferrer"&gt;http://localhost:8080/share&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;Can someone tell me where is the code which alfresco used to create the account automatically ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance&amp;nbsp; !&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Nov 2010 04:39:49 GMT</pubDate>
    <dc:creator>zengqingyi12</dc:creator>
    <dc:date>2010-11-03T04:39:49Z</dc:date>
    <item>
      <title>Where is the code that share create a account automatically</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/where-is-the-code-that-share-create-a-account-automatically/m-p/248508#M201638</link>
      <description>When I configured alfresco share to use passthru SSO authentication, I found when there is no account exist in alfresco, alfresco will create a account with the name automatically when user type:http://localhost:8080/shareCan someone tell me where is the code which alfresco used to create the accoun</description>
      <pubDate>Wed, 03 Nov 2010 04:39:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/where-is-the-code-that-share-create-a-account-automatically/m-p/248508#M201638</guid>
      <dc:creator>zengqingyi12</dc:creator>
      <dc:date>2010-11-03T04:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: Where is the code that share create a account automatically</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/where-is-the-code-that-share-create-a-account-automatically/m-p/248509#M201639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The JavaScript APIs to create people are accessable via REST calls to the Alfresco server.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Look at this URL on your deployed Alfresco instance:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://localhost:8080/alfresco/service/index/uri/" rel="nofollow noopener noreferrer"&gt;http://localhost:8080/alfresco/service/index/uri/&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;search for /person and /people&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- those are the related Webscript api urls that you can call from the web-tier.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Here are the docs: &lt;/SPAN&gt;&lt;A href="http://wiki.alfresco.com/wiki/Reposi...nce#Add_Person" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/Reposi...nce#Add_Person&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The people API expects a JSON request, something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;var myPerson = {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; "userName":"test1",&lt;BR /&gt;&amp;nbsp;&amp;nbsp; "password":"password",&lt;BR /&gt;&amp;nbsp;&amp;nbsp; "firstName":"Test",&lt;BR /&gt;&amp;nbsp;&amp;nbsp; "lastName":"User",&lt;BR /&gt;&amp;nbsp;&amp;nbsp; "email":"test@test.net",&lt;BR /&gt;&amp;nbsp;&amp;nbsp; "disableAccount":false,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; "quota":-1,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; "groups":[]&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;/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;SPAN&gt;To call an API like this from a WebScript component JavaScript controller in Share is easy:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;var json = jsonUtils.toJSONString(myPerson);&lt;BR /&gt;var conn = remote.connect("alfresco");&lt;BR /&gt;conn.post("/api/people", json, "application/json");&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;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;That will create the person.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Take a look at the "Users" Admin Console page in Alfresco Share and the code behind it (files called users.get.* and users.js) for a more advanced example.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note that only a logged in Alfresco admin user can create people!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Nov 2010 16:00:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/where-is-the-code-that-share-create-a-account-automatically/m-p/248509#M201639</guid>
      <dc:creator>kevinr</dc:creator>
      <dc:date>2010-11-08T16:00:44Z</dc:date>
    </item>
  </channel>
</rss>

