06-12-2009 09:32 AM
06-12-2009 10:45 AM
06-15-2009 03:41 AM
DELETE http://localhost:8080/alfresco/service/api/login/ticket/TICKET_044c71c492fdc2199d76381718941a769eeea...
first without posting any parameter. I got a 401 response code which means "Unauthorized"http://localhost:8080/alfresco/service/api/login/ticket/TICKET_f42700bb5490c9a05b02a15fc7d2fd026f086...
to the browser location and guess what happened: It asked me for a login ?!?06-15-2009 03:59 AM
06-15-2009 04:14 AM
The API requires authentication, otherwise you could delete any other user's session by sniffing their ticket.
06-15-2009 04:17 AM
06-15-2009 04:31 AM
I did this:first without posting any parameter. I got a 401 response code which means "Unauthorized"DELETE http://localhost:8080/alfresco/service/api/login/ticket/TICKET_044c71c492fdc2199d76381718941a769eeea...
Reading then ( :wink: ) in the documentation (http://wiki.alfresco.com/wiki/Repository_RESTful_API_Reference#Logout) it told me
Requirements:So it seems that it requires authentication first (although I cannot understand why because the ticket should be authentication enough).
- Default Format: xml
- Authentication: user
- Transaction: required
- Format Style: any
After your post I tried again, but I get the same response code again - so that simply does not work that way.
I tried pasting the urlto the browser location and guess what happened: It asked me for a login ?!?http://localhost:8080/alfresco/service/api/login/ticket/TICKET_f42700bb5490c9a05b02a15fc7d2fd026f086...
I tried again posting some parameters getting an error that the DELETE command does not support output parameters. So now I do not understand anything of what is going on here. And it is a simple shitty logout…
06-15-2009 04:53 AM
1. you login (using either login.get or login.post) and obtain a ticketThanks for your explanations.
2. you make requests to webscripts using this ticket to authenticate
3. you make a DELETE on /api/login/ticket/<ticket> to logout
…obviously, you can also use HTTP Basic auth; it frees you from steps 1 and 3 but you have to send username/password pair on each request (which means keeping them around…)
06-15-2009 05:11 AM
Then we have the login via url parameters that returns XML but using POST it wants and returns JSON. This is confusing (at least for me).They support both, but the default is json (have a look at the webscript description http://localhost:8080/alfresco/service/script/org/alfresco/repository/login.post - there are two response templates)
07-14-2009 06:00 PM
http://localhost:8080/alfresco/service/api/login/ticket/TICKET_36fad5c9f03d97c7f319c0b04216d9bd77a9c...
14 juil. 2009 14:45:57 com.noelios.restlet.ext.httpclient.HttpClientHelper start
INFO: Starting the HTTP client
14 juil. 2009 14:45:57 org.apache.commons.httpclient.HttpMethodDirector isAuthenticationNeeded
INFO: Authentication requested but doAuthentication is disabled
[DEBUG] Déconnexion échouée. Code erreur : 401
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.