掲示板

CMIS URL to open Alfresco document without authentification

thumbnail
10年前 に Julian AFFAIRE によって更新されました。

CMIS URL to open Alfresco document without authentification

New Member 投稿: 6 参加年月日: 12/10/09 最新の投稿
Hi all,

i have a custom liferay portlet that is connected with alfresco by CMIS with the following code:

Map<string, string> param = new HashMap<string, string>();
httpS = PortalUtil.getHttpServletRequest(request).getSession();
user = PortalUtil.getUser(request);
param.put(SessionParameter.USER, user.getLogin());
param.put(SessionParameter.PASSWORD, (String) httpS.getAttribute(WebKeys.USER_PASSWORD));
param.put(SessionParameter.ATOMPUB_URL, atomPubUrl);
param.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value());
param.put(SessionParameter.OBJECT_FACTORY_CLASS, "org.alfresco.cmis.client.impl.AlfrescoObjectFactoryImpl");
...
SessionFactory factory = SessionFactoryImpl.newInstance();
Session session = factory.getRepositories(param).get(0).createSession();
</string,></string,>


My portlet lists alfresco documents and other thing. My problem is that I want to put for all documents a link that allow us to open the document in the browser without asking for an alfresco authentification. Currently, I call an alfresco service to have a connexion tiket with URL: http://{host}/alfresco/s/api/login?u={monLogin}&pw={monPassword}
And after that I make a link like this: https://{HOST}/alfresco/d/d/workspace/SpacesStore/{UUID}/{NAME}?ticket={TICKET}

That works, alfresco doesn't asked for an authentification and the document is opened in the browser. The problem is that Internet Explorer freezes until it has not finish to download the file (it can be very long depending on the file size).
This behaviour is ok (Internet Explorer loads well the document) when I open the document with the URL: https://{HOST}/alfresco/cmisatom/{REPO_ID}/content/{NAME}?id={DOCUMENT_ID};1.0. But with this URL, Alfresco opens a popup to ask for authentification (Adding the ticket at the end of this URL doesn't change nothing).

If someone has an idea how to have this feature, thanks in advance for your help.
thumbnail
10年前 に Mika Koivisto によって更新されました。

RE: CMIS URL to open Alfresco document without authentification

Liferay Legend 投稿: 1519 参加年月日: 06/08/07 最新の投稿
You'll probably find help better from Alfresco forums for alfresco issues.
thumbnail
10年前 に Julian AFFAIRE によって更新されました。

RE: CMIS URL to open Alfresco document without authentification

New Member 投稿: 6 参加年月日: 12/10/09 最新の投稿
Ok I asked me if it existed a way into liferay to obtain alfresco documents without this second authentification (because I have a CMIS session opened in my portlet).
I will ask to Alfresco too, thanks.
thumbnail
10年前 に Mika Koivisto によって更新されました。

RE: CMIS URL to open Alfresco document without authentification

Liferay Legend 投稿: 1519 参加年月日: 06/08/07 最新の投稿
Your portlet can get the binary stream from CMIS api or you could mount the Alfresco repository as remote doclib repository and access the files from there.
thumbnail
8年前 に Dhaval Shah によって更新されました。

RE: CMIS URL to open Alfresco document without authentification

New Member 投稿: 12 参加年月日: 11/05/06 最新の投稿
You might try to bypass the authentication process which alfresco is doing at its end.