Web script authentication

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2007 10:26 AM
Hello,
I would like to access a webscript from Alfresco, and in this websript, I need to get the login (Alfresco login) of the user (which means get person.properties.userName through a template file). I've seen the 'person' node can be used in a webscript only when there is an authentication.
So here come my questions:
As the user connect after loging in Alfresco, can I make an automatic authentication to the webscript so that I will ba able to get his name, and the user does't need to enter his login and password again?
And second question: as I was testing this small application with different users, the authentication was required only for the first user: if I logout from Alfresco and login with a different user, the authentication for the webscript is not required and the userName I get is the one of the 1st user. I have to close my internet browser to get the authentication again. There is probably a simple solution to have the authentication each time, any idea?
Thanks
I would like to access a webscript from Alfresco, and in this websript, I need to get the login (Alfresco login) of the user (which means get person.properties.userName through a template file). I've seen the 'person' node can be used in a webscript only when there is an authentication.
So here come my questions:
As the user connect after loging in Alfresco, can I make an automatic authentication to the webscript so that I will ba able to get his name, and the user does't need to enter his login and password again?
And second question: as I was testing this small application with different users, the authentication was required only for the first user: if I logout from Alfresco and login with a different user, the authentication for the webscript is not required and the userName I get is the one of the 1st user. I have to close my internet browser to get the authentication again. There is probably a simple solution to have the authentication each time, any idea?
Thanks
Labels:
- Labels:
-
Archive
5 REPLIES 5

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2007 10:28 AM
How are you referencing the web script from Alfresco?
If it's from the dashboard, the web script should pick up the user logged into Alfresco.
If it's from the dashboard, the web script should pick up the user logged into Alfresco.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2007 11:09 AM
I was experimenting : I call the web script from a custom view using a template which displays a button.
The button call the web script:
Here is the code of template used in the custom view:
Bad idea my button?
The button call the web script:
Here is the code of template used in the custom view:
<table><tr><td><input type="button" value=" Launch " onclick=window.open("http://localhost:8080/alfresco/service/app_launcher/launch_appli.html")></td></tr></table>
Bad idea my button?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2007 11:15 AM
Replace /alfresco/service with /alfresco/wcservice
The Web Script should then hook up to the Web Client authentication.
See http://wiki.alfresco.com/wiki/Web_Script_Runtimes#Servlet_Runtime_.28HTTP_Access.29
The Web Script should then hook up to the Web Client authentication.
See http://wiki.alfresco.com/wiki/Web_Script_Runtimes#Servlet_Runtime_.28HTTP_Access.29

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2007 11:24 AM
It works perfectly
Thanks a lot
Thanks a lot
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2009 01:02 PM
hi,
I have a webscript that forms a dashlet in alfresco. that webscript depending on which link the user clicks calls another webscript and the modifies a particular div tag with the response from another webscript. I am using /wcs instead of /service. My dashlet loads fine everytime, But the problem is when the user clicks a link sometimes the second webscript fails. What can be the reason behine this it is working most of the time but sometime when a user logs in triges to click a link in the dashlet it throws communication failure.
If somebody can suggest something that will be really helpful, I am really stuck with this one.
thanks in advance
Faisal
I have a webscript that forms a dashlet in alfresco. that webscript depending on which link the user clicks calls another webscript and the modifies a particular div tag with the response from another webscript. I am using /wcs instead of /service. My dashlet loads fine everytime, But the problem is when the user clicks a link sometimes the second webscript fails. What can be the reason behine this it is working most of the time but sometime when a user logs in triges to click a link in the dashlet it throws communication failure.
If somebody can suggest something that will be really helpful, I am really stuck with this one.
thanks in advance
Faisal
