cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 321...@gmail.com
Subject Re: Problems with authentication fw
Date Mon, 24 Jul 2006 17:06:56 GMT
I found the mistake mysqlf, it was in the authenticate.xsl:
<xsl:template match="user">
    <!-- Compare the name of the user -->
    <xsl:if test="normalize-space(name) = $name" >
    <xsl:if test="normalize-space(pw) = $pw">
        <!-- found, so create the ID -->
        <ID><xsl:value-of select="name"/></ID>
    </xsl:if></xsl:if>
</xsl:template>



2006/7/24, 321los@gmail.com <321los@gmail.com>:
>
> Hi,
> I am trying to modify the auth-fw sample, but with username & password.
>
> the relevants parts:
>
> login.xml:
> <form target="do-login" method="post">
>      <input type="text" name="username"/>
>      <input type="text" name="password"/>
>      <input type="submit">Login</input>
>  </form>
>
>
> userlist.xml:
> <user>
>             <name>cocoon</name>
>             <pw>test</pw>
>  </user>
>
>
> authenticate.xsl:
> <xsl:param name="name"/>
> <xsl:param name="pw"/>
> .
> .
> .
> <xsl:template match="user">
>     <!-- Compare the name of the user -->
>     <xsl:if test="normalize-space(name) = $name" and "normalize-space(pw)
> = $pw">
>         <!-- found, so create the ID -->
>         <ID><xsl:value-of select="name"/></ID>
>     </xsl:if>
> </xsl:template>
>
> sitemap:
> <map:match pattern="do-login">
>         <!-- try to login -->
>         <map:act type="auth-login">
>           <map:parameter name="handler" value="demohandler"/>
>           <map:parameter name="parameter_name"
> value="{request-param:username}"/>
>           <map:parameter name="parameter_pw"
> value="{request-param:password}"/>
>           <map:redirect-to uri="protected"/>
>         </map:act>
>         <!-- something was wrong, try it again -->
>         <map:redirect-to uri="login"/>
>       </map:match>
>
> But that does not work. Where is my mistake ?
>
> Thanks for helping
> Marco
>

Mime
View raw message