You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ma...@swisscom.com on 2003/06/11 11:20:49 UTC
Authentification with requests and ldap HELP!
I have a portal, on my login page I have the field "name" and
"password".
When I submit the form : ( <form method="post" target="_top"
action="configDBWOCfree-auth?resource=configDBWOC-portal"> ) I want to
execute the authentification pipeline. To authentificate I want to
execute an ldap query, but with ldap:rootdn (ldap user) and
ldap:password (ldap password) as my two text fields from my login page.
Then, if the query suceeds, get the user information from ldap and go to
the next page.
sitemap.xmap
================
<map:pipeline internal-only="true">
<map:match pattern="sunrise-*">
<!-- authentication -->
<map:match pattern="sunrise-authuser">
<map:generate src="ldap.xml"/>
<map:transform type="ldap">
<map:parameter name="rootdn" value="{request-param:name}"/>
<map:parameter name="password" value="{request-param:password}"/>
</map:transform>
<map:transform type="xslt" src="ldap.xsl">
<map:parameter name="use-request-parameters" value="true"/>
</map:transform>
<map:transform src="styles/sunrise-user.xsl">
<map:parameter name="use-request-parameters" value="true"/>
</map:transform>
<map:serialize type="xml"/>
</map:match>
ldap.xml
================
...
<!-- without <ldap:rootdn> and <ldap:password> because they are
parameters in the sitemap-->
...
ldap.xsl
================
<xsl:param name="password"/>
...
<name><xsl:value-of select="userName"/></name> <!-- userName is an ldap
attribute-->
<password><xsl:value-of select="normalize-space($password)"</password>
sunrise-user.xsl
================
<xsl:param name="password"/>
<xsl:param name="name"/>
...
<xsl:if test="normalize-space(name) = $name and
normalize-space(password) = $password">
...
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org