Hi all,

I am a new Cocoon user trying to build a Web application.

Do you have some examples on how to use your SessionPropagatorAction.

I have an http service responsible for Authenticating my users.
http://WindowsBox:1010/login.asp

My sitemap looks like this:

<map:match pattern="">
    <map:act type="request">
        <map:parameter name="parameters" value="true"/>
        <map:parameter name="default.user" value="foo"/>
        <map:parameter name="default.pwd" value="bar"/>
        <map:generate
src="http://WindowsBox:1010/login.asp?userid={user}&amp;pwd={pwd}"/>
    </map:act>
    <map:serialize type="xml"/>
</map:match>


So I send the username and password to the Http service and get XML back w/
the user info if the Authentication was successful. Something like

<userinfo>
<userid>foo</userid><password>bar</password>
<address>...</address><email>...</email>
</userinfo>

Otherwise you get an userinfo element with an error code/message in it
<userinfo>
<errorcode>123</errorcode>
<errormsg>Wrong username/password, try again.</errormsg>
</userinfo>

At this point I need to store in the session the username, password,
sessionID and a flag that proves that the authentication was successful. It
cannot happen in an XSP because my Authentication service is HTTP, which
becomes a generator in my sitemap.

After my generator I would like to store /userinfo/userid and
userinfo/password in the session. So I can check is the user was
authenticated B4 letting them go through any other pipeline.

I figured SessionPropagatorAction should be the answer, but I cannot figure
out where and how to use it.

<map:act type="session-propagator">
      <paramater name="user" value="{/userinfo/userid}">
      <paramater name="pwd" value="{/userinfo/password}">
        <paramater name="sessionID" value="???">
 </map:act>

Any help would be greatly appreciated.

Thanks, Cocoon *Really Rocks*

./Malick.
[EMAIL PROTECTED]


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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

Reply via email to