cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Maxime.Ghey...@swisscom.com>
Subject RE: Authentification with requests and ldap HELP!
Date Wed, 11 Jun 2003 09:33:34 GMT
In an easier phrase all I still need to do is :

Set the ldap:rootdn and ldap:password values from the login form!

  <map:transform type="ldap">
    <map:parameter name="rootdn"  value="{request-param:name}"/>
    <map:parameter name="password"  value="{request-param:password}"/> 
  </map:transform>  

it's maybe cleaner this way?

Thanks




-----Original Message-----
From:
cocoon-users-return-51886-Maxime.Gheysen=swisscom.com@xml.apache.org
[mailto:cocoon-users-return-51886-Maxime.Gheysen=swisscom.com@xml.apache
.org] 
Sent: Wednesday, June 11, 2003 11:21 AM
To: cocoon-users@xml.apache.org
Subject: 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


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


Mime
View raw message