cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass authentication from Share to custom webscripts on ACS?

SmallHeathTommy
Champ on-the-rise
Champ on-the-rise

How to pass authentication from Share to custom webscripts on ACS?  I currently have some surf webscripts that I will be backing with the repo authentication mechanism by adding <authentication>user</authentication>.  I will be making javascript webservice calls from a custom page on Share. I see there are ways to do this if you are using Alfresco's REST API, but what about for endpoints that aren't part of the REST API?

Using ACS 7.0 Enterprise.

1 ACCEPTED ANSWER

Actually, I found an easier way!

simply using the Share proxy.  endpoint becomes localhost:8080/share/proxy/<alfresco repo endpoint> and Share takes care of the authentication.  Easy Peasy

View answer in original post

5 REPLIES 5

angelborroy
Community Manager Community Manager
Community Manager

You can use the "remote" object from Share to perform your request. This handles Share authentication out of the box.

Sample code is available in:

https://github.com/keensoft/alfresco-agreement-filter/blob/7bf84e27dbb3a6f2dc590719d609d6f43eb44803/...

Hyland Developer Evangelist

I am setting up a single share page that uses jquery to post/get requests to ACS.  I am guessing this would be single Share webscript written in JS to relay the communication between the page and the repository?  Im thinking I can just simply make it generic enough to pass it a URL to hit and request body.   

That is harder, but you still can get a session ticket and use them along with your REST requests.

Hyland Developer Evangelist


@angelborroy wrote:

That is harder, but you still can get a session ticket and use them along with your REST requests.


oh, are you thinking i setup a webscript that calls the ticket service and I can just pass that back and use it in subsequent calls?

Actually, I found an easier way!

simply using the Share proxy.  endpoint becomes localhost:8080/share/proxy/<alfresco repo endpoint> and Share takes care of the authentication.  Easy Peasy