cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Derek Hohls" <DHo...@csir.co.za>
Subject Re: Authentication - passing user info to non-protected match?
Date Fri, 16 Jul 2004 06:09:17 GMT
Olivier

Good to know there is a solution... would you mind
providing me with an example of 
(a) how the variable(s) info is stored using SessionPropagatorAction
(b) how that inf can be passed as a parameter in the sitemap?

Thanks
Derek

>>> obillard@jouve.fr 2004/07/15 05:24:22 PM >>>
Hi Derek,

The user informations are given by the "auth-protect" action.
So you can't access these infos the same way without using the action.

A workaround is to store these infos in session with the 
SessionPropagatorAction, just after a successfull login.

That's what I'm doing and it works fine.
--
Olivier Billard

Derek Hohls wrote:
> I know its poissible to pass authentication info
> to a protected match:
> 
>       <map:match pattern="protected">
>         <map:act type="auth-protect">
>           <map:parameter name="handler" value="demohandler"/> 
>           <map:generate src="docs/protected.xml"/>
>           <map:transform src="stylesheets/simple-page2html.xsl">
>             <map:parameter name="userID" 
> value="{session-context:authentication/authentication/ID}"/>
>          </map:transform> 
>           <map:serialize/>
>         </map:act>
>         <!-- something was wrong, redirect to login page -->
>         <map:redirect-to uri="login"/>
>       </map:match>
> 
> But how do I pass the same session-context in a 
> normal, unprotected match, this:
> 
>       <map:match pattern="unprotected">
>           <map:generate src="docs/unprotected.xml"/>
>           <map:transform src="stylesheets/simple-page2html.xsl">
>             <map:parameter name="userID" 
> value="{session-context:authentication/authentication/ID}"/>
>          </map:transform> 
>           <map:serialize/>
>       </map:match>
> 
> Does not seem to work?
> 
> Thanks
> Derek
> 


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


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.


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


Mime
View raw message