Custom authentication

Hi guys:

I need help to do the following:

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.

Best regards.

This sounds like a custom Single-Sign-on solution. You’ll need to implement a custom Authentication Handler.

This article: https://advantage.webmethods.com/advantage?w=0&targChanId=-536884334&oid=1614272879">https://advantage.webmethods.com/advantage?w=0&targChanId=-536884334&oid=1614272879 describes how to create, implement and register a custom authentication scheme.

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.

Regards,
–mark

Following the instructions, after import the zip into designer, I get the following error on default.jsp in the lines:

Cannot find the tag library descriptor for "http://webmethods.com/portal/taglib/view

Thanks in advance.

regards

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.

(Authentication handlers are legacy portlets)

Regards,
–mark

Can’t find general->Eclipse Project. I did it with general->Existing Projects into Workspace. I don’t have errors now. It’s ok?

Regards

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.

Regards

You need to enable the Legacy Portlet support in Designer. To do this, go to Window → Preferences → General → Capabilities

Then you need to enable the Development → MWS Legacy Portlets support. (Use the Advanced button to toggle this on).

Regards,
–mark

Thanks mimel.

Now, building the portlet I have the following errors / actions:

  1. 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.

  2. 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

May be I missed on some configurations.

Best regards.

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.

Please see $MWS_HOME/mycomponents/readme.txt

Regards,
–mark

What if I create my own portlet under UI perspective???

Does that work? If so, feel free to use that.