WebSphere Portal Server - SiteminderTokenCredential - How to use the

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Portal Server > December 2007 > SiteminderTokenCredential - How to use the





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author SiteminderTokenCredential - How to use the
shantanu.yelwande@kpitcummins.com

2007-12-19, 1:43 am

Hi,<br />
We have a servlet application that is protected by siteminder which in the same single sign on domain as the portal server, but on a different websphere application server. We need to connect to this servlet application through portlet using the credentia
l vault as it is the preferred way to single sign on to backend applications in portal. We are using the SiteMinderTokenCredential object for authenticating with the backend application. We have tried to execute the following code.<br />
<br />
// Get the subject from the VaultService<br />
Subject subject = vaultService.getUserSubject(portletRequest); <br />
<br />
// Get the SiteMinderTokenCredential. . .<br />
Object[] creds =<br />
subject. getPrivateCredentials(SiteMinderTokenCre
dential.class).toArray();<br />
<br />
SiteMinderTokenCredential credential = (SiteMinderTokenCredential) creds[0];<br />
<br />
// This is the protected servlet URL<br />
String protectedURL = "Protected servlet URL";<br />
<br />
HttpURLConnection conn = credential. getAuthenticatedConnection(protectedURL)
;<br />
<br />
The issue is subject.getPrivateCredentials() always return an empty array. We tried replacing the "SiteMinderTokenCredential.class" with LtpaTokenCredential, WebSealTokenCredential, but it still returns an empty array.<br />
<br />
Please can anyone suggest what is the issue and whether we need to make any configuration changes on the portal server?
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com