cancel
Showing results for 
Search instead for 
Did you mean: 

Call Share custom webscript from client side javascript

eureka
Champ in-the-making
Champ in-the-making
Hi all,

please forgive me if this topic has already been submitted but I wasn't able to find it.

My issue is the following: I've developed a Java backed webscript for share that requires user authentication (because I need it to make a call to Alfresco, among the other things) and I want to call this webscript from a client-side javascript code.

I've found an example where the authentication tag for the webscript is set to NONE, but I need it to be USER.

I've managed to call the webscript but I'm promted for the authentication and it's not acceptable (or even working for what it matters). It is strange to me because if a call an alfresco webscrit through the /share/proxy url I get the authentication I'm seeking.

Does anyone have any idea on how to make it or if it is even possible?


Regards,

Angelo 
6 REPLIES 6

mitpatoliya
Star Collaborator
Star Collaborator
you can append guest=true in the end of url as extra argument.
and change authentication to guest
well NONE should also work may be you are missing something else

ddraper
World-Class Innovator
World-Class Innovator
You can also use the "runas" attribute on your authentication element in the WebScript descriptor. Obviously you need to be very aware of security issues when granting user access to unauthenticated users - note that this attribute is only available for web script implementations placed into the Java classpath.

eureka
Champ in-the-making
Champ in-the-making
Is it possible to combine guest authentication (to keep the informations about tenant) and runas admin?

zladuric
Champ on-the-rise
Champ on-the-rise
You can also try directly to backend: /share/proxy/alfresco-noauth/… That enabled non-authenticated users to use the share proxy to backend.

ddraper
World-Class Innovator
World-Class Innovator
I've never tried this, but I don't see why this shouldn't work. The quickest way to find out would probably be to try it Smiley Happy

eureka
Champ in-the-making
Champ in-the-making
As soon as I'll have time I'll try it and let you know Smiley Wink