cancel
Showing results for 
Search instead for 
Did you mean: 

Propagating Share login to my own servlet running in Alfresc

jharrop
Champ in-the-making
Champ in-the-making
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
1 REPLY 1

rivarola
Champ on-the-rise
Champ on-the-rise
Hello,

I'd like to do the same thing. Did anyone find a solution ?