cancel
Showing results for 
Search instead for 
Did you mean: 

(Solved) Webscript and Authenticate

alexey
Champ in-the-making
Champ in-the-making
Hello.
I have a question. I created a webscript which generates a report. The report have hyperlinks on Alfresco spaces.
At first login on page report user inputs login and password.
<webscript>
  <shortname>Status</shortname>
  <description>Report</description>
  <url>/sgnhp/status/args</url>
  <authentication>user</authentication>
</webscript>
Hyperlinks are created so:
<a href="/alfresco${inventoryNumbers.url}" target=_blank>${inventoryNumbers.properties.name}</a>
When i try to browse some Alfresco space using report hyperlinks Alfresco requests login and password again.
Can i browse the Alfresco spaces without repeated login and password request?
Thank you.
4 REPLIES 4

rogier_oudshoor
Champ in-the-making
Champ in-the-making
Did you try calling your webscript under /alfresco/wcs/ instead of /alfresco/service/   :?:

alexey
Champ in-the-making
Champ in-the-making
Thank you for your answer.
No, i didn't. How can i call it under /alfresco/wcs ?
Where can i read about it?

mikeh
Star Contributor
Star Contributor
The /wcs (or "/wcservice") servlet uses Web Client authentication, whereas the "/s" or "/service" servlet uses HTTP Basic auth.

Using the wcs entry path will present users with the web client login page before executing the web script, which may or may not be what you want.

Your other option is to append a ticket onto your inventoryNumbers URL:
?ticket=${session.ticket}
Thanks,
Mike

alexey
Champ in-the-making
Champ in-the-making
Wow! It works!  Smiley Very Happy
Thanks a lot, Mike!