cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guido Casper <gcas...@s-und-n.de>
Subject Re: Auth-fw, can't get Session context
Date Thu, 19 May 2005 07:13:11 GMT
Stavros Kounis wrote:
> hi all
> 
> i try to use Auth-FW. i have choose to create one just like the flow
> based in cocoon's samples.
> 
> The auth process work fine (i can login log-out etc) but i can not get
> loged-in user's information.
> 
> I have try the code snippet from AuthFWWithFlow wiki page [1]
> 
> ....
> var contextMan =
> cocoon.getComponent(Packages.org.apache.cocoon.webapps.session.ContextManager.ROLE);
> var authContext = contextMan.getContext("authentication");
> var userFrag = authContext.getXML("/authentication/ID");
> var username = Packages.org.apache.cocoon.xml.dom.DOMUtil.getValueOfNode(userFrag);
> ...
> 
> this code return NULL at contextMan.getContext("authentication").
> 
> I have to note that when i add this snippet at original cocoon's
> sample work fine.
> 
> Did anyone give me a hint where i have to look for?

The authentication context is only available within sitemap sections 
being protected via AuthAction.

HTH
Guido

-- 
Freundliche Grüße / With kind regards
Guido Casper

S&N AG
Competence Center Open Source
Klingenderstr. 5
D 33100 Paderborn

voice  +49 5251/1581-87
fax    +49 5251/1581-71
eMail  gcasper@s-und-n.de
Web    http://www.s-und-n.de

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


Mime
View raw message