Thanks Jan!
I got the idea now...
Little problem that this ( {ID} ) will work only in pipeline which exactly
uses auth handler..
Cause I have a bunch of pages to protect , I have one pipeline with
"protect" which uses then internal pipelines, but I think i can handle this
problem..
Other question is can you please point me out on this:
I want to have like this (really common for webapps :-) ): after user login,
have a session with user data (names, adresses etc...). This I can do using
this "auth fw" and put everithing in session contexts. Problem actually in
retrieving this data... Like to add parameters to links etc...
For docs I use xml, transformed through xsl...
For example I need a link like
<a href=edit_form?username=get username from session>Edit profile</a>Where it is better to do this? In xsl like: <xsl:template match="editProfileLink"> Here goes html code for this link with added params from session </xsl:template> or directly in xml doc? Im confused about this :) thx in advance... "Jan Hoskens" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > When the user is authenticated, you can use {ID} and {ROLE} in your sitemap: > > <!-- taken from http://cocoon.apache.org/2.1/developing/webapps/authentication.html > at the bottom --> > > <map:match pattern"protected"> > <map:act type="auth-protect"> <!-- protect the resource --> > <map:parameter name="handler" value="myhandler"/> > > <!-- Append the ID of the user to the file name --> > <map:generate src="resource_{ID}.xml"/> > <map:transform src="toHTML"/> > <map:serialize/> > > </map:act> > </map:match> > > Pass it to an xsl stylesheet: > <map:transform src="mysheet.xsl"> > <map:parameter name="login" value="{ID}" /> > </map:transform> > > and in your stylesheet declare at toplevel: > > <xsl:stylesheet...> > <xsl:param name="login"/> > > > If needed: there are ways to get session xml in flowscript or jxtemplates, just give a sign if you > need these (they are somewhere on the mail archives too). > > Kind regards, > Jan > > Ilja Smoli wrote: > > Thx for reply > > But as I understood authentication fw stores session object as xml > > and i can not get attributes using {session:} :( > > > > > > "Bowe, Bastian" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > > >>Never used session. But can't you use {session:username} as a > >><map:parameter/> for your <map:transform type="xsl"/> ? > >> > >> > >>>-----Original Message----- > >>>From: Ilja Smoli [mailto:[EMAIL PROTECTED] > >>>Sent: Monday, February 14, 2005 2:33 PM > >>>To: [email protected] > >>>Subject: session context > >>> > >>> > >>>Hi > >>>I use authentification framework in cocoon 2.1.5... > >>>I know that to get data out of session I can use > >>><session:getxml... tag But what if i need this in XSL > >>>stylesheet? Or for example in my xml page where i want to put > >>>some value from session to link as query parameter? Smth like: > >>>------------------------------- > >>><?xml version="1.0"?> > >>><page> > >>> <title>Home</title> > >>> <content> > >>> <center> > >>> <a href='edit-form-person?user=HERE must go > >>>username from session'>Edit profile</a><br/> ................ > >>> > >>>Thx in advance... > >>> > >>> > >>> > >>> > >>>--------------------------------------------------------------------- > >>>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] > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
