How to get alf_ticket in Alfresco Share 3.4

泄露秘密 提交于 2019-12-22 13:56:41

问题


I've been using context.properties.alfTicket to get a ticket for some custom stuff I've been working before, but recently I migrated from Alfresco 3.0 to 3.4.

Now I can't find the authentication ticket in Alfresco Share - is there a way to get this? Whether in JavaScript (server-side, of course) or freemarker.

Edit: I added a bounty. I'll give the bounty to whoever gives me the code sample on how to get the alf_ticket in document-details.get.js or document-details.get.html.ftl.


回答1:


In an Alfresco webscript you could use session.ticket, this should be available in Share to. This link to the alfresco 3.4 javascript api could also be useful, I don't think this is references anywhere on the alfresco site.




回答2:


According to the latest Template Guide : http://wiki.alfresco.com/wiki/Template_Guide

The session.ticket should be available in the Freemarker Template.



来源:https://stackoverflow.com/questions/4491698/how-to-get-alf-ticket-in-alfresco-share-3-4

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!