Thanks Vivek, I also need to make changes in LoginModule,so I should take the complete source code of Jetspeed or only the security part of components?
Vivek Kumar wrote: > > Hi > > Please find the SSO Iframe portlet for 2.1.3 here > > http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.3/components/web-content/src/java/org/apache/jetspeed/portlet/ > > Vivek > ShilpaOSI wrote: >> 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-tp20570398p21598327.html Sent from the Jetspeed - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: jetspeed-user-unsubscr...@portals.apache.org For additional commands, e-mail: jetspeed-user-h...@portals.apache.org