You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "g[R]eK" <gR...@warsztat.pac.pl> on 2004/09/17 23:39:02 UTC
Re[2]: authentication framework over a mysql connection
<. Hi fabrizio! .>
Friday, September 17, 2004, 11:12:47 PM, you wrote:
fp> here it is the component configuration
fp> <map:pipelines>
fp> <map:component-configurations>
fp> <authentication-manager>
fp> <handlers>
fp> <handler name="torquemada">
fp> <redirect-to uri="cocoon:loginsrc"/>
I think should be cocoon:/loginsrc.
fp> <authentication uri="cocoon:raw:/authenticate"/>
fp> </handler>
fp> </handlers>
fp> </authentication-manager>
fp> </map:component-configurations>
Your piece sent before:
<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>
Also seems to be wrong. You must use internal redirect:
http://cocoon.apache.org/2.1/userdocs/concepts/redirection.html#Internal+Redirects+Using+the+Cocoon+Protocol
Please paste result of athenticate match if you provide valid login&pass as
parameters.
--
Best regards
<. g[R]eK mailto:gReK@warsztat.pac.pl .>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Re[2]: authentication framework over a mysql connection
Posted by fabrizio picca <fa...@gmail.com>.
those parameters are sent the same way as the example given in cocoon
documentation.
we tried maintaining the same pipeline structure and authenticating
over a xml file and t works.Is th database authentication that doesn't
works.
After the above mentioned sentence in the pipeline we have a so-formed
authentication pipeline:
<map:pipeline internal-only="true">
<!-- This is the authentication resource -->
<map:match pattern="authenticate">
<map:generate src="login/do-login.xml"/>
<!--<map:generate src="docs/userlist.xml"/>-->
<map:transform src="stylesheets/do-login.xsl" label="debug6">
<map:parameter name="use-request-parameters" value="true"/>
</map:transform>
<map:transform type="sql" label="debug3">
<map:parameter name="use-connection" value="mysql"/>
</map:transform>
<map:transform src="stylesheets/authenticate.xsl" >
<map:parameter name="use-request-parameters" value="true"/>
</map:transform>
<map:transform type="encodeURL"/>
<map:serialize type="xml" label="debug5"/>
</map:match>
</map:pipeline>
that first produce a file with the username mined out from the
database the second transformer validate the user .
here something doesn't work.
the file with the query is now, accordingly to the link you gave, like this:
<?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>
but i still can get nothing out of it.
don't wanna bother anymore...sorry.
On Fri, 17 Sep 2004 23:39:02 +0200, g[R]eK <gr...@warsztat.pac.pl> wrote:
> <. Hi fabrizio! .>
>
> Friday, September 17, 2004, 11:12:47 PM, you wrote:
>
> fp> here it is the component configuration
>
> fp> <map:pipelines>
> fp> <map:component-configurations>
> fp> <authentication-manager>
> fp> <handlers>
> fp> <handler name="torquemada">
> fp> <redirect-to uri="cocoon:loginsrc"/>
>
> I think should be cocoon:/loginsrc.
>
> fp> <authentication uri="cocoon:raw:/authenticate"/>
> fp> </handler>
> fp> </handlers>
> fp> </authentication-manager>
> fp> </map:component-configurations>
>
> Your piece sent before:
> <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>
>
> Also seems to be wrong. You must use internal redirect:
> http://cocoon.apache.org/2.1/userdocs/concepts/redirection.html#Internal+Redirects+Using+the+Cocoon+Protocol
>
> Please paste result of athenticate match if you provide valid login&pass as
> parameters.
>
>
>
> --
> Best regards
> <. g[R]eK mailto:gReK@warsztat.pac.pl .>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
--
copyright - fabpicca
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org