Hello,
I'm trying to use Cocoon 2 with SessionValidatorAction and 
DatabaseAuthenticatorAction to handle user authentication, but I'm unable to 
get the session validator to see the session variables set by the database 
authenticator. Searching mail and groups archives didn't help much ...

Versions : Cocoon 2.0b1, Tomcat 3.2.3, Apache 1.3.19 (with mod_jk)

------- in sitemap.xmap -------
   <map:match pattern="">
    <map:redirect-to session="true" uri="welcome"/>
   </map:match>

   <map:match pattern="welcome*">
    <map:act type="session-validator">
     <map:parameter name="descriptor" value="test/resources/session.xml"/>
     <map:parameter name="validate-set" value="is-logged-in"/>
    </map:act>
    <map:generate src="sens3d/plan.xml"/>
    <map:transform src="stylesheets/html.xsl"/>
    <map:serialize/>
   </map:match>

   <map:match pattern="do-login">
    <map:act type="form-validator">
     <map:parameter name="descriptor" value="test/resources/session.xml"/>
     <map:parameter name="validate-set" value="login-form"/>
     <map:act type="db-authenticator">
      <map:parameter name="descriptor" value="test/resources/login.xml"/>
      <map:redirect-to session="true" uri=""/>
     </map:act>
    </map:act>
   </map:match>
----------------------------

When I try to log in ("do-login"), I get this in the log file :

   DBAUTH: authorized successfully
   DBAUTH: session created
   DBAUTH: propagating param login=henot
   DBAUTH: propagating param name=Hénot David
   Action ((Action)this.actions.select( db-authenticator )).act
   Sitemap: session='true', redirecting to ''
   redirect: entering session mode
   redirect: session mode completed, id = lsbkkpjd81
   Sending redirect to ';jsessionid=lsbkkpjd81'

So everything seems OK but later when the session validator is called :

   SESSIONVALIDATOR: validating parameters from given constraint-set 
is-logged-in
   SESSIONVALIDATOR: given set is-logged-in contains 2 rules
   VALIDATOR: validating parameter: login
   VALIDATOR: validating string parameter login (encoded in a string: false)
   VALIDATOR: validating parameter: name
   VALIDATOR: validating string parameter name (encoded in a string: false)
   SESSIONVALIDATOR: all session params validated

It looks like the validator didn't see anything in the session, and in fact I 
can't use the name variable from the xsl stylesheet (always undefined 
although I put a "<xsl:param name="name"/>" after the xsl:stylesheet)

Any help *much* appreciated !

-- 
David Hénot

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

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

Reply via email to