i attach also this lines....hope it can help: <map:match pattern="do-login"> <!-- try to login --> <map:act type="auth-login"> <map:parameter name="handler" value="torquemada"/> <map:parameter name="parameter_name" value="{request-param:username}"/> <map:parameter name="parameter_pwd" value="{request-param:password}"/> <map:redirect-to uri="protected"/> </map:act> <!-- something was wrong, try it again --> <map:redirect-to uri="loginsrc"/> </map:match>
and part of the file for the sql transformation: <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:param name="name"/> <xsl:param name="pwd"/> <xsl:template match="authentication"> <user> <execute-query xmlns="http://apache.org/cocoon/SQL/2.0"> <query> SELECT uid,username,password from users where username= '<sql:substitute-value sql:name="username"/>' and password = '<sql:substitute-value sql:name="password"/>' </query> </execute-query> </user> </xsl:template> </xsl:stylesheet> On Fri, 17 Sep 2004 23:12:47 +0200, fabrizio picca <[EMAIL PROTECTED]> wrote: > here it is the component configuration > > <map:pipelines> > <map:component-configurations> > <authentication-manager> > <handlers> > <handler name="torquemada"> > <redirect-to uri="cocoon:loginsrc"/> > <authentication uri="cocoon:raw:/authenticate"/> > </handler> > </handlers> > </authentication-manager> > </map:component-configurations> > > > > > On Fri, 17 Sep 2004 23:05:20 +0200, g[R]eK <[EMAIL PROTECTED]> wrote: > > <. Hi fabrizio! .> > > > > Friday, September 17, 2004, 10:38:24 PM, you wrote: > > > > fp> i'm new to cocoon and i'm trying to develop a web application for a > > fp> university examination. > > > > fp> I've read everything about Authentication FW but i cannot find nothing > > fp> about authenticating over > > fp> a mysql DB connection. so i've written down this piece of pipeline: > > > > <snip/> > > > > fp> <map:pipeline><!--questa deve essere internal--> > > > > Authenticate match should be in internal only pipeline: > > <map:pipeline internal-only="true"> > > > > It will protect from non internal requests. > > > > fp> <!-- This is the authentication resource --> > > fp> <map:match pattern="authenticate"> > > fp> <map:generate src="login/do-login.xml"/> > > fp> <map:transform src="stylesheets/do-login.xsl" label="debug6" > > > fp> <map:parameter name="use-request-parameters" value="true"/> > > fp> </map:transform> > > > > I guess, above transform is only for include values of request parameters > > (username, password). If I'm right you should use this SAFER method: > > http://cocoon.apache.org/2.1/userdocs/transformers/sql-transformer.html#Substitution > > > > fp> <map:transform type="sql" label="debug3"><!--effettua la query al > > database--> > > fp> <map:parameter name="use-connection" value="mysql"/> > > fp> </map:transform> > > fp> <map:transform src="stylesheets/authenticate.xsl" > > > fp> <map:parameter name="use-request-parameters" value="true"/> > > fp> </map:transform> > > fp> <map:transform type="encodeURL"/> > > fp> <map:serialize type="xml" label="debug5"/> > > fp> </map:match> > > > > I'm not sure what this transform is for. > > > > fp> </map:pipeline> > > > > fp> but i didn't reach anything but a redirect to the login page as i've > > fp> decided in the first piece of pipeline. > > > > fp> Can anyone tell me what's wrong? > > fp> Please! > > > > Send your handler configuration, please. > > > > -- > > Best regards > > <. g[R]eK mailto:[EMAIL PROTECTED] .> > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > copyright - fabpicca > -- copyright - fabpicca --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]