I need to invoke a page (login portlet?) with a session id parameter passed to a preference in the portlet. Imagine the portlet has anonymous access. The session id, is the session id from other application. My portlet should ask the application if the session id is valid. The application may return a domain user id. I need this user id become the current user (set) and redirect to another page.
I have no problems setting permissions or passing parameters to a portlet, however I have no idea how to set an arbitraty domain user as the current user.
You’ll want to look at the implementation of the wm_custAuth.zip. Specifically, the CustAuthHandler. That class is responsible for extracting information and specifying the AuthInfo information.
You’ll still need to ensure that MWS has a directory service that can lookup the userid in question.
I just tried it and it seemed to work for me. One key thing to note, is that this isn’t a CAF project. When importing in Designer, just choose a general Eclipse Project to import.
Can’t find general->Eclipse Project. I did it with general->Existing Projects into Workspace. I don’t have errors now. It’s ok?
Also, instructions says “Build the project in the webMethods Portlets perspective and deploy to the server”, and I can’t find Portlet perspective either.
Now, building the portlet I have the following errors / actions:
can’t find net/sf/antcontrib/antcontrib.properties. Action: I’ve downloaded ant-contrib-0.6.jar and I’ve installed in preferences->ant-runtime->ant home entries.
can’t find xmltask. Action: I’ve downloaded xmltask.jar and I’ve installed in preferences->ant-runtime->ant home entries.
Now show me the following error:
BUILD FAILED
C:\SoftwareAG\eclipse\v34\plugins\com.webMethods.portal.PortletGenerator_8.0.0.0000-0060\lib\component_build.xml:146: taskdef class com.webMethods.portal.build.ComputeComponentProperties cannot be found
You won’t be able to build and deploy legacy portlets from 8.0.2 Designer (it was fixed in 8.2) In the meantime, you’ll need to use the command line tools to build and deploy these components.