cancel
Showing results for 
Search instead for 
Did you mean: 

Authentication required when logged in

buurd
Champ in-the-making
Champ in-the-making
Hi!

I have a html-document that make a few ajax-calls to webscripts. These webscripts requires the user to be logged (<authentication>user</authentication>). The problem is that in order to get to the html-file you need to be logged in and then you have to login once more in order to fetch data from the webscripts.

How to get the browser to realize that the user already is authenticated? It is the same browser, the same server and the same webapp in tomcat so I really don't see why I'm asked to authenticate myself a second time for the webscripts.

Thanks in advance
Roland
2 REPLIES 2

openpj
Elite Collaborator
Elite Collaborator
Have you tried to invoke that webscript using the Web Client servlet for authentication?
In this way you can use the same authentication context to execute the webscript without authenticating that user in the same browsing session.

You can try to invoke this URL for your WebScript:

http://localhost:8080/alfresco/wcservice/yourCustomWebscriptUrl….
Hope this helps.

buurd
Champ in-the-making
Champ in-the-making
Thanks!

It solved the problem. It also seems a lot faster, had about 500 ms for each request on my local installation and now it's down to less than 200 ms.

Best Regards
Roland