cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Franco Andrao <>
Subject authentication-fw with mysql
Date Thu, 09 Jun 2005 14:34:37 GMT
I'm trying to use the sample Authentication-fw using mysql, but  
actually is not working and I'm lost.

I modify the pipelines with:

     <map:pipeline internal-only="true">
       <map:match pattern="authenticate">
         <map:generate src="userSql.xml"/>
          <map:transform type="sql">
             <map:parameter name="use-connection" value="mdgDB"/>
             <map:parameter name="show-nr-of-rows" value="true"/>
             <map:parameter name="clob-encoding" value="UTF-8"/>
           <map:parameter name="use-request-parameters" value="true"/>
         <map:transform src="stylesheets/authenticate.xsl">
           <map:parameter name="use-request-parameters" value="true"/>
         <map:serialize type="xml"/>

where userSql.xml"

<?xml version="1.0" encoding="UTF-8"?>

     <execute-query xmlns="">
      <query name="authUser">
           select ut_login,ut_psw from dbutenti
           ut_login='<substitute-value name="parameter_name"/>
           AND ut_psw='<substitute-value name="parameter_passwd"/>'

and authenticate.xsl

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"

<xsl:param name="ut_login"/>
<xsl:param name="ut_psw"/>

<xsl:template match="authentication">
     <xsl:apply-templates select="rowset"/>

<xsl:template match="row">
     <!-- Compare the name of the user -->
     <xsl:if test="normalize-space(ut_login) = $ut_login">
         <xsl:if test="normalize-space(ut_psw) = $ut_psw">
             <ID><xsl:value-of select="name"/></ID>


The connection to the db is working but i don't know how test is the  
parameter are passed properly...
Someone could help me to understand what is wrong


View raw message