12-19-07 06:43 AM
Hi,<br />
We have a servlet application that is protected by siteminder which in the s
ame 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 authentica
ting with the backend application. We have tried to execute the following co
de.<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. W
e tried replacing the "SiteMinderTokenCredential.class" with LtpaTokenCreden
tial, 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?
[ Post a follow-up to this message ]
|