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

cancel
Showing results for 
Search instead for 
Did you mean: 
SmallHeathTommy
Active Member

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

Jump to solution

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 Solution

Accepted Solutions
SmallHeathTommy
Active Member

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

Jump to solution

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 solution in original post

5 Replies
angelborroy
Alfresco Employee

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

Jump to solution

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
SmallHeathTommy
Active Member

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

Jump to solution

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.   

angelborroy
Alfresco Employee

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

Jump to solution

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

Hyland Developer Evangelist
SmallHeathTommy
Active Member

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

Jump to solution

@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?

SmallHeathTommy
Active Member

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

Jump to solution

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