cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco Web Script Portlet rivet

rivetlogic
Champ on-the-rise
Champ on-the-rise
AWPr

AWPr is a JSR-168 portlet that can be used to expose remote Alfresco Web scripts, including those that need user authentication. With the help of a custom Alfresco authentication component that we wrote the portlet can carry the user credentials from the portal to Alfresco, authenticate the user in Alfresco and retrieve a ticket that can be used during all subsequent interactions between the end-user, the portlet and ultimately the Alfresco Web script itself.

Motivation for AWPr

When integrating Alfresco Web scripts with JBoss Portal or Liferay Portal AWPr alleviates the need for having to deploy all of Alfresco inside the portal as is the case when using Alfresco's OOTB (out-of-the-box) Web script portlet for Alfresco/Portal integration.

AWPr is also highly configurable. Through the use of portlet preferences you can create multiple instances of AWPr and configure each one with a different Web script URL and a set of parameters with default values if needed. The instance will then RESTfully fetch the result of the Web script's render phase and carry that over to the portlet finally rendering it on the screen within the confines of the portlet window.

It is hence possible to run two instances of AWPr on a single portal page where each instance is exposing a different Web script even if those Web scripts are hosted on two different Alfresco servers regardless of their geographic location.

AWPr lives here:
http://wiki.rivetlogic.org/display/AWPr/

Feel free to ask questions about AWPr in this thread.

–Alaaeldin
125 REPLIES 125

rivetlogic
Champ on-the-rise
Champ on-the-rise
Hi,

Changing STAr's code won't help. When you're not logged in to Liferay and access an AWPr portlet it will try to access the webscript as a guest user. To do what you want you will need to change the code of AWPr, not STAr. You will need to change the code that attempts to access the webscript as an Alfresco guest user and make it get a ticket for a hardcoded user called 'liferayguest'.

Hope this helps,

–Alaaeldin

marco_altieri
Star Contributor
Star Contributor
Thank you very much for your quick response.
I'll work on AWPr as you suggested, but I would like to have anyway the source code of STAr.
Could you please tell me where can I get it?

Thank you
Marco

Hi,

Changing STAr's code won't help. When you're not logged in to Liferay and access an AWPr portlet it will try to access the webscript as a guest user. To do what you want you will need to change the code of AWPr, not STAr. You will need to change the code that attempts to access the webscript as an Alfresco guest user and make it get a ticket for a hardcoded user called 'liferayguest'.

Hope this helps,

–Alaaeldin

rivetlogic
Champ on-the-rise
Champ on-the-rise
Sure thing:

https://svn.rivetlogic.org/repos/rivets/utils/star/

Please also be mindful of the licensing for STAr (GPL) and AWPr (AGPL).

Thanks,

–Alaaeldin

nowhere
Champ in-the-making
Champ in-the-making
Hi Rivet, hi all…
I have a question, maybe silly, but it's a boring issue to me, I hope you can help me.
I have an AWPr portlet in liferay firts page and what I'd like is that webscript call succeed if liferay current user is an alfresco valid user too and fails otherwise. But it happens that I log in liferay and suddenly a  new user appears in alfresco with username as liferay e-mail. I can nor delete nor modify new alfresco user. Why is this happening? Is it correct? It sounds strange to me…but I'm newbie so there are many things I don't understand  Smiley Surprisedops:  :cry:
Waiting for your opinions 🙂
Have a nice day!

EDIT: If I create a alfresco user with id = liferay mail it works, but as soon I log in liferay with an user not in alfresco it creates it in alfresco.

rivetlogic
Champ on-the-rise
Champ on-the-rise
Hi,

You might find the following thread helpful in answering some of your questions:

http://forums.alfresco.com/en/viewtopic.php?f=9&t=1720

Cheers,

–Alaaeldin

rivetlogic
Champ on-the-rise
Champ on-the-rise
AWPr 1.2.0 has been released and has a new feature: (see the wiki for more details)

- A new portlet preference called proxyAllUrls to allow an AWPr instance to proxy all webscript URLs. Setting proxyAllUrls to true (which is the default) will make AWPr ignore the value set for proxyUrls.

You can download AWPr 1.2.0 here.

Please use this forum if you have any questions about the new features.

Thanks,

–Alaaeldin

nowhere
Champ in-the-making
Champ in-the-making
Hi,

You might find the following thread helpful in answering some of your questions:

http://forums.alfresco.com/en/viewtopic.php?f=9&t=1720

Cheers,

–Alaaeldin

Thanks Alaaeldin!
It was very usefull. 🙂

dnavarro
Champ in-the-making
Champ in-the-making
Hi,

  Thanks for your work, Alaaeldin.

   I'm having problems working with:
    Liferay Portlet 5.2.2
    Alfresco Labs 3Stable
   Have everyone connected them?.

   I thought it was imposibble because:
Alfresco 3Stable CIFS share becomes unstable with "UserTransaction being garbage collected without a commit() or rollback()." error
, see https://issues.alfresco.com/jira/browse/ETHREEOH-1553 for more information.

   Best,

      David Navarro.

braddavis
Champ in-the-making
Champ in-the-making
Sure thing:

https://svn.rivetlogic.org/repos/rivets/utils/star/

Please also be mindful of the licensing for STAr (GPL) and AWPr (AGPL).

Thanks,

–Alaaeldin


Is the STAr still required to use AWPr 1.2?  Alfresco 3.1 does not seem to pick up the AMP for STAr 1.0.  We are using JBoss EPP 4.3 with Alfresco 3.1 Labs.

rivetlogic
Champ on-the-rise
Champ on-the-rise
Hi,

According to our testing STAr does work with Alfresco 3.1 Enterprise. Maybe you're facing the issue related to the fact that the contents of chaining-authentication-context.xml are different depending on which Alfresco version you're using.

Please refer to the following wiki page for assistance:

http://wiki.rivetlogic.com/display/AWPr/STAr

Make sure your chaining-authentication-context.xml has the contents in the Alfresco 3.1 section of that wiki page.

[EDIT] Note: STAr is needed for all versions of AWPr

Hope this helps,

–Alaaeldin