You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Manuel Ottaviano <co...@lst.tfo.upm.es> on 2006/07/26 16:22:03 UTC

Auth Problem

Hello Cocoon developers, I've problems with the authentication framework.
I use the example in   "samples/blocks/authentication-fw/login"
I want to authenticate against a mysql.
I've create a specific pipeline process that works correctly and 
generates an authentication file:


First I've define the following pipeline process:

 <map:generate src="mysql.xml"/>
 <map:transform type="sql">
 <map:parameter name="use-connection" value="myheartDB"/>
 <map:parameter name="user" value="{request-param:user}"/>
 <map:parameter name="password" value="{request-param:password}"/>
 <map:parameter name="product" 
value="{request-param:product}"/></map:transform>
<map:transform type="xslt" src="sql2html.xsl"/> 
 <map:serialize />

and I've tested out from the authntification example. When the 
authentication is correct the application generates the following XML


<?xml version="1.0" encoding="ISO-8859-1"?>
<authentication xmlns:sql="http://apache.org/cocoon/SQL/2.0">
<ID>bover</ID><role>cardiologist</role>
<data>
 <product_id>1</product_id><name>Ramón</name><surname>Bover</surname><email/><telephone/>        

 </data>
 </authentication>


I test this part and I assume that is works

But when I insert the pipeline process inside the authentification URI 
the application does not authenticate and redirect to the login page 
[authntification failed?]
this is the declaration...

  <map:pipeline internal-only="true">
 <!-- This is the authentication resource -->
 <map:match pattern="authenticate">
<map:generate src="mysql.xml"/>
<map:transform type="sql">
 <map:parameter name="use-connection" value="myheartDB"/>
 <map:parameter name="user" value="{request-param:user}"/>
 <map:parameter name="password" value="{request-param:password}"/>
 <map:parameter name="product" 
value="{request-param:product}"/></map:transform>
<map:transform type="xslt" src="sql2html.xsl"/> 
  <map:serialize />
  </map:match>
  </map:pipeline>

but if I create a static XML file as output of the same application and 
I put in the auth URI the authentification framework works. this the 
declaration:
    <map:pipeline internal-only="true">
      <!-- This is the authentication resource -->
      <map:match pattern="authenticate">
    <map:generate src="auth.xml"/>     --> this is the static file.......
  
  <map:serialize />
      </map:match>
     
    
    </map:pipeline>


WHY???

Note: I've declared the sql transformer

Best Regards
Manuel Ottaviano



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