cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirk-Willem van Gulik <di...@webweaving.org>
Subject Re: (SOLVED)Re: Portal: Desperately seeking autehtication/ID from Java code
Date Sat, 18 Sep 2004 11:22:54 GMT

On Fri, 17 Sep 2004, Steinar Rune Eriksen wrote:

> OK, I solved it.  I also had to wrap the pipeline into a auth-protect
> block, as well as using the following to get the component manager
>
> 	public String getUserId() throws Exception{
> 		org.apache.avalon.framework.component.ComponentManager cm=
> CocoonComponentManager.getSitemapComponentManager();
> 		SessionManager sessionManager = (SessionManager)cm.lookup(
> 				org.apache.cocoon.webapps.session.SessionManager.ROLE);
> 		String userLogin = sessionManager.getContextFragment( "authentication",
> 				"/authentication/ID").getFirstChild().getNodeValue();
> 		return userLogin;
> 	}

Can someone add this to the docs or as exmple code ? And ideally also with
another functional example of doing the same for an SSL cert ;-)

Dw.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message