cancel
Showing results for 
Search instead for 
Did you mean: 

Authenticate a webscript session with URL parameters

tonyc
Champ in-the-making
Champ in-the-making
Hello,

I have developed a webscript that gets a document by doc_id (custom property),  the problem is that I -have- to make this webscript also authenticate the session.

I cannot use SSO, and the user shouldn't type in the user/password.  The user/password must be in the URL, which is generated for the user. 
example:
http://localhost:8080/alfresco/service/getDoc?doc_id=12345&user=user&password=password

Would anyone know the best way to accomplish this if it can be done?
2 REPLIES 2

amarendra_thaku
Champ in-the-making
Champ in-the-making
you can get the alfresco ticket from the session and pass the ticket in the URL query string

model.ticket = session.getTicket(); and then

http://localhost:8080/alfresco/service/getDoc?doc_id=12345&user=user&password=password&alf_ticket=ti...

Regards
Amarendra

tonyc
Champ in-the-making
Champ in-the-making
Amerendra,

The session wouldn't be authenticated so there wouldn't be a ticket I dont think.. I am trying to get the webscript to authenticate the session with the URL params.