AnsweredAssumed Answered

Validating tickets via REST API

Question asked by dm_nypl on May 16, 2013
Latest reply on May 16, 2013 by dm_nypl
Hello,

I'm building a client library for my alfresco installation using the apache HttpClient library. I've run into a small problem I can't seem to figure out. I am requesting a ticket for the API using a request as such:


new HttpGet("http://www.myserver.com:8080/alfresco/service/api/login?u=me&pw=mypassword")


from this I get can get a ticket by parsing the response and then saving the ticket in a text file:
TICKET_1a1246e2f2704fd85fdd73f23fcc1c4493772a91


if i then make another request to the application to validate the ticket, like I would with a browser,  with :

new HttpGet("http://www.myserver.com:8080/alfresco/service/api/login/ticket/TICKET_1a1246e2f2704fd85fdd73f23fcc1c4493772a91")


I get an error back stating that I need to be authenticated to make this request. Is there a way in the REST API i can do this? I presume that the application is saving some other authentication information in a session cookie when doing this sort of request?

Thanks

Don

Outcomes