<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: symfony&#8217;s sfGuard plugin and LDAP</title>
	<atom:link href="http://www.matthewbull.net/2008/06/29/symfonys-sfguard-plugin-and-ldap/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.matthewbull.net/2008/06/29/symfonys-sfguard-plugin-and-ldap/</link>
	<description>web development and photography</description>
	<lastBuildDate>Fri, 29 Jan 2010 22:11:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Ashton Honnecke</title>
		<link>http://www.matthewbull.net/2008/06/29/symfonys-sfguard-plugin-and-ldap/comment-page-1/#comment-334</link>
		<dc:creator>Ashton Honnecke</dc:creator>
		<pubDate>Fri, 29 Jan 2010 22:11:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.matthewbull.net/?p=51#comment-334</guid>
		<description>I have detailed a solution to this problem, very easily altered to use both or either authentication mechanisms.  The big deal is to alter the validator for that signin form because that is where it blows up where there is no user.

http://blog.honnecke.us/2010/01/using-sfdoctrineguardusers-external-authentication/</description>
		<content:encoded><![CDATA[<p>I have detailed a solution to this problem, very easily altered to use both or either authentication mechanisms.  The big deal is to alter the validator for that signin form because that is where it blows up where there is no user.</p>
<p><a href="http://blog.honnecke.us/2010/01/using-sfdoctrineguardusers-external-authentication/" rel="nofollow">http://blog.honnecke.us/2010/01/using-sfdoctrineguardusers-external-authentication/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan</title>
		<link>http://www.matthewbull.net/2008/06/29/symfonys-sfguard-plugin-and-ldap/comment-page-1/#comment-308</link>
		<dc:creator>Stefan</dc:creator>
		<pubDate>Mon, 28 Sep 2009 14:55:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.matthewbull.net/?p=51#comment-308</guid>
		<description>Any new findings on this one? I&#039;m running into the same problem implementing a Facebook Connect for a Symfony app.</description>
		<content:encoded><![CDATA[<p>Any new findings on this one? I&#8217;m running into the same problem implementing a Facebook Connect for a Symfony app.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ReynierPM</title>
		<link>http://www.matthewbull.net/2008/06/29/symfonys-sfguard-plugin-and-ldap/comment-page-1/#comment-243</link>
		<dc:creator>ReynierPM</dc:creator>
		<pubDate>Wed, 20 May 2009 03:08:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.matthewbull.net/?p=51#comment-243</guid>
		<description>Well this is what I&#039;m think too. I have a method in wich I use a LDAP class and check the credentials of a certain user. Then after check if the user is who really he/she said then I want to insert this data in sf_guard table but I don&#039;t know how. Can any help me?</description>
		<content:encoded><![CDATA[<p>Well this is what I&#8217;m think too. I have a method in wich I use a LDAP class and check the credentials of a certain user. Then after check if the user is who really he/she said then I want to insert this data in sf_guard table but I don&#8217;t know how. Can any help me?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Volker</title>
		<link>http://www.matthewbull.net/2008/06/29/symfonys-sfguard-plugin-and-ldap/comment-page-1/#comment-214</link>
		<dc:creator>Volker</dc:creator>
		<pubDate>Tue, 12 May 2009 19:10:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.matthewbull.net/?p=51#comment-214</guid>
		<description>I&#039;ve run into a similar problem as ReynierPM and Julien: I can&#039;t validate the LDAP password unless I use a username which is registered in the sfGuard database. The user &quot;admin&quot; exists only if you created it during inital setup of the sfGuard plugin. This is due to the way the validator class of the plugin checks the password: By using an instance of sfGuardUser ( $user = sfGuardUserPeer::retrieveByUsername($username) ). If the user doesn&#039;t exist in the database, he/she cannot be checked for the (ldap) password afterwards.

What I need is a way to have a sfGuard user from the ldap directory. Maybe I can write a custom ::retrieveByUsername() method which initally pulls the requested user out of the ldap directory and inserts it into the sfGuard database? But I get the feeling this is not the way this powerful framework should be used. Does anybody else have an idea about this?</description>
		<content:encoded><![CDATA[<p>I&#8217;ve run into a similar problem as ReynierPM and Julien: I can&#8217;t validate the LDAP password unless I use a username which is registered in the sfGuard database. The user &#8220;admin&#8221; exists only if you created it during inital setup of the sfGuard plugin. This is due to the way the validator class of the plugin checks the password: By using an instance of sfGuardUser ( $user = sfGuardUserPeer::retrieveByUsername($username) ). If the user doesn&#8217;t exist in the database, he/she cannot be checked for the (ldap) password afterwards.</p>
<p>What I need is a way to have a sfGuard user from the ldap directory. Maybe I can write a custom ::retrieveByUsername() method which initally pulls the requested user out of the ldap directory and inserts it into the sfGuard database? But I get the feeling this is not the way this powerful framework should be used. Does anybody else have an idea about this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Massimiliano Arione</title>
		<link>http://www.matthewbull.net/2008/06/29/symfonys-sfguard-plugin-and-ldap/comment-page-1/#comment-177</link>
		<dc:creator>Massimiliano Arione</dc:creator>
		<pubDate>Mon, 20 Apr 2009 13:40:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.matthewbull.net/?p=51#comment-177</guid>
		<description>It&#039;s seems too easy to me, so I think I&#039;m missing something... can&#039;t you simply override checkPassword method in sfGuardUser class? sfGuardUser is an extension of PluginsfGuardUser and it&#039;s the class used by sfGuard (indeed, the use of PluginsfGuardUser class is just meant to be something in the middle between sfGuardUser and BasesfGuardUser to separate plugin&#039;s customizations and developer&#039;s ones).</description>
		<content:encoded><![CDATA[<p>It&#8217;s seems too easy to me, so I think I&#8217;m missing something&#8230; can&#8217;t you simply override checkPassword method in sfGuardUser class? sfGuardUser is an extension of PluginsfGuardUser and it&#8217;s the class used by sfGuard (indeed, the use of PluginsfGuardUser class is just meant to be something in the middle between sfGuardUser and BasesfGuardUser to separate plugin&#8217;s customizations and developer&#8217;s ones).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ReynierPM</title>
		<link>http://www.matthewbull.net/2008/06/29/symfonys-sfguard-plugin-and-ldap/comment-page-1/#comment-175</link>
		<dc:creator>ReynierPM</dc:creator>
		<pubDate>Fri, 17 Apr 2009 02:02:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.matthewbull.net/?p=51#comment-175</guid>
		<description>Well I follow all the steps and it doesn&#039;t work for me. First I create a file called LDAP.class.php and put this code inside:
class LDAPclass extends sfGuardSecurityUser {
    public static function checkLDAPPassword($username, $password)
    {
        $options = array(&#039;account_suffix&#039;=&gt;&#039;@uci.cu&#039;,&#039;base_dn&#039;=&gt;&#039;DC=uci,DC=cu&#039;,&#039;domain_controllers&#039;=&gt;array(&#039;10.0.0.3&#039;,&#039;10.0.0.4&#039;));
        $ldap = new adLDAP($options);
        $authenticated = $ldap-&gt;authenticate($username, $password);
        if ($authenticated) {
            return true;
        } else {
            return false;
        }
    }
}

and my app.yml file look like this:
all:
  sf_guard_plugin:
    check_password_callable: [LDAP, checkLDAPPassword]

When I put my domain user I get always this error: The username and/or password is invalid.

Can any help me?</description>
		<content:encoded><![CDATA[<p>Well I follow all the steps and it doesn&#8217;t work for me. First I create a file called LDAP.class.php and put this code inside:<br />
class LDAPclass extends sfGuardSecurityUser {<br />
    public static function checkLDAPPassword($username, $password)<br />
    {<br />
        $options = array(&#8216;account_suffix&#8217;=&gt;&#8217;@uci.cu&#8217;,'base_dn&#8217;=&gt;&#8217;DC=uci,DC=cu&#8217;,'domain_controllers&#8217;=&gt;array(&#8216;10.0.0.3&#8242;,&#8217;10.0.0.4&#8242;));<br />
        $ldap = new adLDAP($options);<br />
        $authenticated = $ldap-&gt;authenticate($username, $password);<br />
        if ($authenticated) {<br />
            return true;<br />
        } else {<br />
            return false;<br />
        }<br />
    }<br />
}</p>
<p>and my app.yml file look like this:<br />
all:<br />
  sf_guard_plugin:<br />
    check_password_callable: [LDAP, checkLDAPPassword]</p>
<p>When I put my domain user I get always this error: The username and/or password is invalid.</p>
<p>Can any help me?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: po5i</title>
		<link>http://www.matthewbull.net/2008/06/29/symfonys-sfguard-plugin-and-ldap/comment-page-1/#comment-117</link>
		<dc:creator>po5i</dc:creator>
		<pubDate>Wed, 04 Feb 2009 19:21:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.matthewbull.net/?p=51#comment-117</guid>
		<description>That worked Ben, thanks.

Now I only have to write the LDAP autentication code... since I&#039;m not the ldap admin I have to figure it out.</description>
		<content:encoded><![CDATA[<p>That worked Ben, thanks.</p>
<p>Now I only have to write the LDAP autentication code&#8230; since I&#8217;m not the ldap admin I have to figure it out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The Codebelay Blog &#187; Installing sfGuardPlugin in symfony 1.1 &#8212; A Guide for the Perplexed</title>
		<link>http://www.matthewbull.net/2008/06/29/symfonys-sfguard-plugin-and-ldap/comment-page-1/#comment-54</link>
		<dc:creator>The Codebelay Blog &#187; Installing sfGuardPlugin in symfony 1.1 &#8212; A Guide for the Perplexed</dc:creator>
		<pubDate>Mon, 18 Aug 2008 18:45:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.matthewbull.net/?p=51#comment-54</guid>
		<description>[...] If you need to link the sf_guard_user login table to your user account table, this blog post provides a clue. [...]</description>
		<content:encoded><![CDATA[<p>[...] If you need to link the sf_guard_user login table to your user account table, this blog post provides a clue. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: matthew</title>
		<link>http://www.matthewbull.net/2008/06/29/symfonys-sfguard-plugin-and-ldap/comment-page-1/#comment-47</link>
		<dc:creator>matthew</dc:creator>
		<pubDate>Mon, 04 Aug 2008 19:07:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.matthewbull.net/?p=51#comment-47</guid>
		<description>Ah great thanks! I haven&#039;t had time to look in detail at 1.1 yet but I&#039;ll give that a try.</description>
		<content:encoded><![CDATA[<p>Ah great thanks! I haven&#8217;t had time to look in detail at 1.1 yet but I&#8217;ll give that a try.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://www.matthewbull.net/2008/06/29/symfonys-sfguard-plugin-and-ldap/comment-page-1/#comment-46</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Sun, 03 Aug 2008 18:47:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.matthewbull.net/?p=51#comment-46</guid>
		<description>Did you try the following?
$user = sfGuardUserPeer::retrieveByUsername($username);
return $user-&gt;checkPasswordByGuard($password);

the new version (for Symfony 1.1) contains the $user object as a third parameter in the callable I believe, so you don&#039;t have to call the retrieveByUsername thus saving one SQL statement.</description>
		<content:encoded><![CDATA[<p>Did you try the following?<br />
$user = sfGuardUserPeer::retrieveByUsername($username);<br />
return $user-&gt;checkPasswordByGuard($password);</p>
<p>the new version (for Symfony 1.1) contains the $user object as a third parameter in the callable I believe, so you don&#8217;t have to call the retrieveByUsername thus saving one SQL statement.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
