cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Docter" <Alexan...@alexio.nl>
Subject login validator
Date Fri, 14 Mar 2003 10:09:51 GMT
Hi,

in our webapplication users need to login first.
For every request we have to check if someone is logged in.
For example, I could create a TestLoginAction
and use a parameter selector to determine if the user is logged in.
But this creates a big if-else loop in every pipeline.

Is there some way to have this behaviour defined for all pipelines?

I was thinking about the following :
<map:pipeline>
<map:match="*">
<map:act type="testloginaction">
<map:select type="parameter" >
        <map:parameter name="parameter-selector-test" value="{loggedin}" />
		<map:when test="notloggedin">
<!-- redirect to login page -->
</map:when>
<map:otherwise>
<map:match pattern ="req1" >
<!-- pipeline 1 -->
</map:match>
<map:match pattern ="req2" >
<!-- pipeline 2 -->
</map:match>
</map:otherwise>

Does this work?
Or is there some other nice way to do this?
Any suggestions on this would be welcome.

Alexander



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


Mime
View raw message