0

I need to implement a web script that generates a returns the ticket for the current user. This web script is addressed by the URI I use to setup a URLConncetion. The ticket should be contained in the response body, which I need to evaluate in my JSP (or Java code) to extract the ticket. How can be done by a simple JavaScript / FreeMarker web script, using the JavaScript session root scope object to retrieve the ticket, i.e. session.getTicket() ? Can any one pls write the steps to do?

Boat
  • 515
  • 2
  • 8
  • 28

1 Answers1

3

ticket.get.html.ftl (or json or whatever you want):

${session.ticket}
plus-
  • 45,453
  • 15
  • 60
  • 73
  • Ok. Thanx a lot. It got worked. I wrote in userticket.get.html.ftl . How could I get this ticket in my jsp page or java class? – Boat Apr 22 '13 at 09:46
  • You can get ticket using following RESTful API ----> GET /alfresco/service/api/login?u={username}&pw={password?} – mitpatoliya Apr 23 '13 at 05:36
  • I am trying to implement External SSO. Can't provide password. I need to append the ticket dynamically to the redirect URL to pass it to the client. So that the ticket will automatically login the user with the same context used in my JSP. So how can get the ticket in my jsp? Web script to return the ticket is created. – Boat Apr 23 '13 at 11:30