AnsweredAssumed Answered

Propagating Share login to my own servlet running in Alfresc

Question asked by jharrop on Oct 14, 2009
Latest reply on Apr 6, 2011 by rivarola
I wanted to ensure that the credentials the user entered on the Share login page were used for my own servlet, running in the Alfresco webapp.

Just use the EndPointProxyServlet, right?

That's what I did, but it wasn't as easy as I expected, so I thought I'd post what I did here. 

To start with, I defined an endpoint in webscript-framework-config.xml; that was fine.

org.alfresco.web.site.AlfrescoUserFactory is called when they login; it puts credentials in the vault, but these are specific to the alfresco endpoint.  So I had to change it to put credentials for my endpoint into the vault as well.

Next, AlfrescoAuthenticator was trying to log in to my endpoint, to get a ticket.  It should be getting it from the alfresco endpoint (/alfresco/s/api/login), so I had to change that code as well.

Finally, my custom servlet is using the WebDAV AuthenticationFilter, which looks for an authentication ticket using parameter name  ARG_TICKET = "ticket".   The proxy servlet was sending the ticket using a parameter PARAM_TICKETNAME_ALF_TICKET = "alf_ticket", so that was a third change.

Maybe I missed something, or some of this is not required by the latest Alfresco code? 

cheers .. Jason

Outcomes