You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by H....@MI.unimaas.nl on 2004/05/16 22:09:51 UTC

RE: Getting additional user's information from session object (au thentication framework problem)

Hi,
 
I'm not a guru on the authentication framework, but two things sprang to
mind:
 
1. IIRC the authentication context is "fixed", i.e. it can only contain the
information you wrote below. Please reread the documentation and do correct
me if I'm wrong.
 
2. 
<map:transform src="styles/user.xsl">
     <parameter name="user" value="{/authentication/data/name}"/>
</map:transform>
 
AFAIK the parameter value should be
"{session-context:/authentication/data/name}"
 
HTH
 
Bye, Helma

-----Original Message-----
From: Mariusz Wojcik [mailto:wojcikm@okno.pw.edu.pl] 
Sent: Sunday, 16 May 2004 19:53
To: users@cocoon.apache.org
Subject: Getting additional user's information from session object
(authentication framework problem)


Hi 
I'd like to keep in session some additional information about users. My
sunrise-user.xml file looks like this:
 
*************************sunrise_user.xml ******************
<authentication>
 <users>  
  <user>
   <name>cocoon</name>
   <password>cocoon</password>
   <role>cocoon</role>
   <data>    
    <name>hello</name>
    <age>12</age>
   </data>   
  </user>  
 </users>
</authentication>
**********************************************
 
I have no problem with getting ID, and role content, but when I use session
transformer to get name or age I get this result:
 
************ session transformer result *****
<authentication>
<ID>cocoon</ID>
<role>cocoon</role>
<data>
<user>cocoon</user>
</data>
<type>cocoon.authentication</type>
<media>html</media>
</authentication>
<application>
*************************************************
As you can see my <data></data> elements, hasn't got <name> and <age>
children... why ?????
 
This is part of my_session_view.xsp file:
 
*******************my_session_view.xsp *******************************
<session:getxml context="authentication" path="/"/>
<session:getxml context="authentication" path="/authentication/data/name"/>

 
****************************************************************************
 
At the sitemap's level I have tried to do it in this way (but every time I
get nothing). My pipeline is auth-protect:
 
************************ sitemap *************************
<map:transform src="styles/user.xsl">
     <parameter name="user" value="{/authentication/data/name}"/>
</map:transform>
************************************************************
 
What I'm doing wrong ? How can I get access to this additional data in xsp
file, and in sitemap (I need them in sitemap too :( ) ?????
 
 
greeting 
mario