cancel
Showing results for 
Search instead for 
Did you mean: 

Validating tickets via REST API

dm_nypl
Champ in-the-making
Champ in-the-making
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_1a1246e2f2704fd85fdd73f23fcc1c...")


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
1 REPLY 1

dm_nypl
Champ in-the-making
Champ in-the-making