If the user is logged in, there should be an authentication context.
Using 2.1m2 or later, you can access this context (for reading) using the session 
transformer.

In your sitemap:
            <map:match pattern="*">
              <map:generate src="content/xml/{1}.xml"/> 
              <map:transform type="session"/>
              <map:serialize/>
            </map:match>

In your xml (xhtml) file:
  <?xml version="1.0"?>

  <html xmlns:session="http://apache.org/cocoon/session/1.0";>
  <head><title>Sample</title></head>
  <body>
  <h1>Sample - Home {user= 
  <session:getxml context="authentication" path="*/data/rlname"/>
  }</h1>
  </body>
  <html>

Note: In this case my authentication handling adds /data/rlname to the XML document 
returned to the authentication handler.

I realize this isn't exactly what you were asking for, but hopefully it helps...

--Chris

> -----Original Message-----
> From: maisonneuve nico [SMTP:[EMAIL PROTECTED]
> Sent: Friday, August 08, 2003 11:32 AM
> To:   [EMAIL PROTECTED]
> Subject:      Session and authentication 
> 
> hy
> 
> i have the welcome page:
> <page>
>       <user/>
> </page>
> 
> i would like use always the same tag (<user/>) that display :
> if the user is logged his name
> else a authentication form (it's a good practice ?)
> 
> i use the authentication Framework.( it's works).
> and a styleslsheet with  the template :
> 
> <xsl:template match="user">
> 
> </xsl>
> but i dont know how do to see in the template that the user is logged or not
> 
> thanks in advance
> 
> _________________________________________________________________
> Trouvez l'�me soeur sur MSN Rencontres ! http://g.msn.fr/FR1000/9551
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to