cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Laurent Trillaud" <>
Subject RE: getting username from session after authentication
Date Fri, 27 Feb 2004 13:45:11 GMT
I give you a sample to see what you have in your context authentication. It
will help you to find the path to retrieve your login.
Declare this match in you sitemap
            <map:match pattern="session-account.ccn">
                <map:act type="auth-protect">
                    <map:parameter name="handler" value="demohandler" />
                    <map:generate src="session-account.xml"/>
                    <map:transform type="session"/>
                    <map:serialize type="xml" />
with the following session-account.xml
<?xml version="1.0" encoding="UTF-8"?>
<doc xmlns:session="">
	<session:getxml context="authentication" path="/"/>
You should see something like
  ... and so on depends of your authenticate.xsl
  ... the tag ID depends also of your authenticate.xsl
Assuming that the login is store in the ID tag. To access it use the
following pipeline
<map:match pattern="show-login">
 <map:generate src="dummy.xml"/>
 <map:transform src="xml2html.xsl"> 
  <map:parameter name="username" value="{ID}"/
 <map:serialize type="html"/>
Hope, that will be useful.
Laurent Trillaud

> Thanks for response, but I am a beginner in Cocoon and I don´t understand
> it, or it doesn´t works for me. :-(
> My goal is make different menus depending to valid users or anonymous
> user.
> I would like to make it my xsl if it possible.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message