So, I had a problem with my form control template where I had dropdown which did AJAX calls to share webscripts and it requested logins cause my share webscript were configured like with <authentication>user</authentication> .
But I looked at documentlibrary implementation and it's tree and all I see is Alfresco.util.Ajax calls and I haven't found any authentication mechanism behind it. How does this work?