Thanks a lot David,
Now I am getting the username of the current logged in user.
But I am not able to see the .java file you are talking about.How can I see
the java code for that portlet?
David Sean Taylor wrote:
>
>
> On Jan 20, 2009, at 6:46 PM, ShilpaOSI wrote:
>
>>
>> I am using Jetspeed 2.1.3.So Where are the login details stored, and
>> how
>> should I extract them.I want to use user id and the password through
>> which a
>> user login to Jetspeed.So that I can use the same details to open
>> other link
>> without promting for a login screen.
>>
> OK, I understand now. Sorry Im so dense.
>
> Take a look at the SSOIFramePortlet.java, here are the key
> ingredients, (you might want to take more care for checking for
> unauthenticated users etc)
> In this case we are getting the credentials for the current, logged on
> user:
>
> Subject subject = getSubject();
> SSOContext context = sso.getCredentials(subject, site);
> request.setAttribute(SSO_REQUEST_ATTRIBUTE_USERNAME,
> context.getRemotePrincipalName());
> request.setAttribute(SSO_REQUEST_ATTRIBUTE_PASSWORD,
> context.getRemoteCredential());
>
> private Subject getSubject()
> {
> AccessControlContext context = AccessController.getContext();
> return JSSubject.getSubject(context);
> }
>
>
>
--
View this message in context:
http://www.nabble.com/Jetspeed-SSO-tp20570398p21579855.html
Sent from the Jetspeed - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]